Set SNI for TSL connections - #1088
Merged
Merged
Conversation
Contributor
Author
|
Relevant discussion: #488 |
cbandy
approved these changes
Aug 20, 2022
Contributor
Author
|
@rafiss, any chance you can take a look? This PR is hanging approved for some amount of time. |
rafiss
reviewed
Aug 29, 2022
rafiss
requested changes
Aug 29, 2022
rafiss
left a comment
Collaborator
There was a problem hiding this comment.
errors from linting:
Error: ssl_test.go:347:4: this value of err is never used (SA4006)
Error: ssl_test.go:348:4: this value of err is never used (SA4006)
Error: ssl_test.go:392:5: should use !bytes.Equal(startupMessage, []byte{0, 0, 0, 0x8, 0x4, 0xd2, 0x16, 0x2f}) instead (S1004)
darinpp
reviewed
Aug 29, 2022
kelvich
force-pushed
the
sni_support
branch
2 times, most recently
from
August 29, 2022 20:48
9927d34 to
0c4600d
Compare
Contributor
Author
|
Thanks for the review, I've fixed mentioned issues |
This allows an SNI-aware proxy to route connections. Patch adds a new connection option (`sslsni`) for opting out of the SNI, to have the same behavior as `libpq` does. See more in `sslsni` sections at <https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS>.
rafiss
self-requested a review
September 1, 2022 12:49
rafiss
approved these changes
Sep 6, 2022
rafiss
left a comment
Collaborator
There was a problem hiding this comment.
thanks for your contribution!
|
This seems to have broken connections with sslmode=verify-ca. This setting is supposed to ignore the DNS names in the server certificate, but now connections fail with "x509: certificate is valid for x, y, z, not a".
|
Contributor
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows an SNI-aware proxy to route connections. Patch adds a new
connection option (
sslsni) for opting out of the SNI, to have the samebehavior as
libpqdoes. See more insslsnisections athttps://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS.