Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sess_hits counter on the server (#1974)
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. There's a nice description of the counter in this older commit: 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. ### 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.
- Loading branch information