Perform a SSL quiet shutdown when close-notify is not sent #5935
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.
Debugging the SSL session cache I've found the following behaviour:
The expected output should be something like:
Enabling the debug log for the session cache shows the following output:
As it can be observed from the logs,
2C0460F5FA8B58E3B4E1146597A44F4AC3CB7FD5E602851FC27AC93D567ADEEBgets saved into the session cache at10:01:39.577and gets evicted at10:01:39.580Tracking this behaviour with gdb we can see how
ssl_rm_cached_sessionis triggered:ssl_rm_cached_sessiongets called after being triggered bySSL_free() --> ssl_clear_bad_session().SSL quiet shutdown got removed from ATS as part of 03734d0 because it prevents close-notify from being set. This PR re-introduces SSL quiet shutdown iff close-notify is not sent and the SSL handshake has been completed.
With the patch applied, openssl s_client -reconnect behaves as expected: