SNI: added restriction for TLSv1.3 cross-SNI session resumption. #493
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.
In OpenSSL, session resumption always happens in the default SSL context, prior to invoking the SNI callback. Further, unlike in TLSv1.2 and older protocols, SSL_get_servername() returns values received in the resumption handshake, which may be different from the value in the initial handshake. Notably, this makes the restriction added in b720f65 insufficient for sessions resumed with different SNI server name.
Considering the example from b720f65, previously, a client was able to request example.org by presenting a certificate for example.org, then to resume and request example.com.
The fix is to reject handshakes resumed with a different server name, if verification of client certificates is enabled in a corresponding server configuration.
Proposed changes
Describe the use case and detail of the change.
If this pull request addresses an issue on GitHub, make sure to reference that
issue using one of the
supported keywords.
Before creating a pull request, make sure to comply with the
Contributing Guidelines.