-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Correctly place the SSL channel handler in front of the PostgresChannelHandler #527
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great patch! See comments. Pretty sure you will need to fix some tests.
Sources/PostgresNIO/Connection/PostgresConnection+Configuration.swift
Outdated
Show resolved
Hide resolved
e42b2ab
to
9afe181
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #527 +/- ##
==========================================
- Coverage 61.77% 61.76% -0.01%
==========================================
Files 125 125
Lines 10072 10072
==========================================
- Hits 6222 6221 -1
- Misses 3850 3851 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great patch! Thanks!
Ensure that
NIOSSLClientHandler
is added immediately beforePostgresChannelHandler
instead of at the front of the entire pipeline.This ensures that TLS works correctly when working with preexisting channels, such as tunneling connections with
NIOSSH
. See also #526 .Thanks to @Joannis and @gwynne for finding the problem and pointing me to the right place to fix it.