summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorBen Kaduk <kaduk@mit.edu>2018-09-04 12:30:00 -0500
committerMatt Caswell <matt@openssl.org>2018-09-07 15:21:27 +0100
commit328a0547ad61d9e260fca73a280d2288714f2b92 (patch)
treefad0422e2f958d6c8b886a1f5a0a4e586bc97023 /crypto
parent2c0267fdc99f8a06cb205f0faecc2ff06f0de8bf (diff)
Simplify SSL_get_servername() to avoid session references
Ideally, SSL_get_servername() would do exactly as it is documented and return exactly what the client sent (i.e., what we currently are stashing in the SSL's ext.hostname), without needing to refer to an SSL_SESSION object. For historical reasons, including the parsed SNI value from the ClientHello originally being stored in the SSL_SESSION's ext.hostname field, we have had references to the SSL_SESSION in this function. We cannot fully excise them due to the interaction between user-supplied callbacks and TLS 1.2 resumption flows, where we call all callbacks but the client did not supply an SNI value. Existing callbacks expect to receive a valid SNI value in this case, so we must fake one up from the resumed session in order to avoid breakage. Otherwise, greatly simplify the implementation and just return the value in the SSL, as sent by the client. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7115)
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions