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

[ADDED] TLS: natsOptions_TLSHandshakeFirst() #780

Merged
merged 2 commits into from
Aug 7, 2024
Merged

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented Aug 6, 2024

This is to force a client to perform the TLS handshake first, that is, not wait for the INFO protocol from the server. This is needed if the server is configured to require clients to perform the TLS handshake first (before sending the INFO protocol).

Resolves #779

Signed-off-by: Ivan Kozlovic [email protected]

This is to force a client to perform the TLS handshake first, that
is, not wait for the INFO protocol from the server. This is needed
if the server is configured to require clients to perform the TLS
handshake first (before sending the INFO protocol).

Resolves #779

Signed-off-by: Ivan Kozlovic <[email protected]>
Copy link

@johnweldon johnweldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thank you!

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 68.88%. Comparing base (1553d4a) to head (64697d7).
Report is 5 commits behind head on main.

Files Patch % Lines
src/conn.c 50.00% 0 Missing and 4 partials ⚠️
src/opts.c 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #780      +/-   ##
==========================================
+ Coverage   68.71%   68.88%   +0.16%     
==========================================
  Files          39       39              
  Lines       15207    15251      +44     
  Branches     3143     3157      +14     
==========================================
+ Hits        10449    10505      +56     
+ Misses       1700     1674      -26     
- Partials     3058     3072      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kozlovic
Copy link
Member Author

kozlovic commented Aug 6, 2024

@levb Looking at a flapper on Windows (not specific to this PR it seems). If I find a fix (assuming it is just test), will add a commit here. At any rate, will ping when ready for review.

If the cluster was not fully established when the rest of the test
was running, the library may get additional client URLs to reconnect
to (gossip protocol). Looks like this was happening more on Windows CI
than Linux.

Using some options to clamp all that.

Signed-off-by: Ivan Kozlovic <[email protected]>
@kozlovic
Copy link
Member Author

kozlovic commented Aug 6, 2024

@levb Ok, I added a fix for the test. Ready for review.

Copy link
Collaborator

@levb levb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@levb levb merged commit fbcddd1 into main Aug 7, 2024
29 checks passed
@levb levb deleted the tls_handshake_first branch August 7, 2024 13:39
github-actions bot pushed a commit that referenced this pull request Aug 7, 2024
@levb
Copy link
Collaborator

levb commented Aug 7, 2024

@kozlovic It's failing the test against an older server, was this a 2.10 feature?
image

@kozlovic
Copy link
Member Author

kozlovic commented Aug 7, 2024

Maybe. Let me see. If so, we just need to add the check for server version. Give me a minute.

@kozlovic
Copy link
Member Author

kozlovic commented Aug 7, 2024

Yes, it is a 2.10.0 thing. I will post a quick PR to fix the test.

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.

Support handshake_first
3 participants