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

Fix sess_hits counter on the server #1974

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

samuel40791765
Copy link
Contributor

Issues:

Addresses CryptoAlg-2700

Description of changes:

While debugging the Ruby tests using an external session cache for TLS 1.2, there was an issue found where we were bumping up the SSL_CTX_sess_hits counter even when there wasn't a session found in the cache. We bump sess_hits in three places, due to it's broader implied meaning in OpenSSL. @WillChilds-Klein has an older commit with a nice description of the counter: 4b18065

Apparently session could be a nullptr, which means a session wasn't found. In the original code, this meant that we would be updating the cache hit counter regardless of a session being found or not. This should only be updated when a session was found. Changing it to check for an existing pointer in session fixes this.

Call-outs:

N/A

Testing:

New check inserted in an external session cache check.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.75%. Comparing base (0cfd3ed) to head (800e172).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1974      +/-   ##
==========================================
- Coverage   78.77%   78.75%   -0.02%     
==========================================
  Files         590      590              
  Lines      101482   101482              
  Branches    14396    14397       +1     
==========================================
- Hits        79945    79926      -19     
- Misses      20902    20920      +18     
- Partials      635      636       +1     

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

@samuel40791765 samuel40791765 merged commit c9d48a6 into aws:main Nov 9, 2024
115 of 116 checks passed
@samuel40791765 samuel40791765 deleted the fix-ssl-sess-hits branch November 9, 2024 00:28
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.

4 participants