Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip fingerprint check when TLS session is being reused #197

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

JoshMock
Copy link
Member

When a TLS session is reused by a connection, subsequent attempts to get the socket's peer certificate will return an empty object, as per the Node.js docs. This would cause the transport's server certificate CA fingerprint match check to fail. It is safe to assume a reused TLS session is secure because the fingerprint check was done on a prior request (see nodejs/node#3940 (comment)).

Currently, the transport will throw an error that the fingerprint does not match when a session is reused, because the certificate is empty. Checking for session reuse solves this problem, which was originally reported in elastic/elasticsearch-js#2355.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant