openssl/ssl
Matt Caswell e9cd6e763c Fix SSL_get_servername() and SNI behaviour
The SNI behaviour for TLSv1.3 and the behaviour of SSL_get_servername()
was not quite right, and not entirely consistent with the RFC.

The TLSv1.3 RFC explicitly says that SNI is negotiated on each handshake
and the server is not required to associate it with the session. This was
not quite reflected in the code so we fix that.

Additionally there were some additional checks around early_data checking
that the SNI between the original session and this session were
consistent. In fact the RFC does not require any such checks, so they are
removed.

Finally the behaviour of SSL_get_servername() was not quite right. The
behaviour was not consistent between resumption and normal handshakes,
and also not quite consistent with historical behaviour. We clarify the
behaviour in various scenarios and also attempt to make it match historical
behaviour as closely as possible.

Fixes #8822

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/10018)

(cherry picked from commit 7955c1f16e72dc944677fd1dbf4b1300e75f1c84)
2020-01-30 16:07:12 +00:00
..
record Fix TLS not using aes_cbc_hmac_sha ciphers 2020-01-21 13:55:50 +01:00
statem Fix SSL_get_servername() and SNI behaviour 2020-01-30 16:07:12 +00:00
bio_ssl.c Reorganize local header files 2019-09-27 23:58:06 +02:00
build.info
d1_lib.c Reorganize local header files 2019-09-27 23:58:06 +02:00
d1_msg.c Reorganize local header files 2019-09-27 23:58:06 +02:00
d1_srtp.c Reorganize local header files 2019-09-27 23:58:06 +02:00
methods.c Reorganize local header files 2019-09-27 23:58:06 +02:00
packet.c Reorganize local header files 2019-09-27 23:58:06 +02:00
packet_local.h Fix header file include guard names 2019-09-27 23:58:12 +02:00
pqueue.c Reorganize local header files 2019-09-27 23:58:06 +02:00
s3_cbc.c Reorganize local header files 2019-09-27 23:58:06 +02:00
s3_enc.c Reorganize local header files 2019-09-27 23:58:06 +02:00
s3_lib.c Reorganize local header files 2019-09-27 23:58:06 +02:00
s3_msg.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_asn1.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_cert.c SSL: Document SSL_add_{file,dir}_cert_subjects_to_stack() 2019-11-12 13:43:33 +01:00
ssl_cert_table.h Update copyright year 2018-03-20 13:08:46 +00:00
ssl_ciph.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_conf.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_err.c Don't interleave handshake and other record types in TLSv1.3 2019-02-19 09:37:29 +00:00
ssl_init.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_lib.c Fix SSL_get_servername() and SNI behaviour 2020-01-30 16:07:12 +00:00
ssl_local.h Check that the default signature type is allowed 2020-01-25 14:12:10 +01:00
ssl_mcnf.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_rsa.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_sess.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_stat.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_txt.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ssl_utst.c Reorganize local header files 2019-09-27 23:58:06 +02:00
t1_enc.c Fix some typos 2019-12-11 19:17:00 +01:00
t1_lib.c Check that the default signature type is allowed 2020-01-25 14:12:10 +01:00
t1_trce.c Do not print extensions in Certificate message for TLS1.2 and lower 2019-10-03 10:30:57 +10:00
tls13_enc.c Update tls13_enc.c 2020-01-02 13:52:10 +01:00
tls_srp.c Reorganize local header files 2019-09-27 23:58:06 +02:00