Move the TLSv1.3 handshake struct inside the shared handshake struct.
authorjsing <jsing@openbsd.org>
Sun, 21 Mar 2021 18:36:34 +0000 (18:36 +0000)
committerjsing <jsing@openbsd.org>
Sun, 21 Mar 2021 18:36:34 +0000 (18:36 +0000)
commitd4edc922de00e0977a67ceb1c4b74ab035533c7e
tree3197dd6f6f75325215a27d268f794d3633bf34ac
parent804ba004a3c6e32b6d518dc386f786a27bcddcc5
Move the TLSv1.3 handshake struct inside the shared handshake struct.

There are currently three different handshake structs that are in use -
the SSL_HANDSHAKE struct (as S3I(s)->hs), the SSL_HANDSHAKE_TLS13 struct
(as S3I(s)->hs_tls13 or ctx->hs in the TLSv1.3 code) and the infamous
'tmp' embedded in SSL3_STATE_INTERNAL (as S3I(s)->tmp)).

This is the first step towards cleaning up the handshake structs so that
shared data is in the SSL_HANDSHAKE struct, with sub-structs for TLSv1.2
and TLSv1.3 specific information. Place SSL_HANDSHAKE_TLS13 inside
SSL_HANDSHAKE and change ctx->hs to refer to the SSL_HANDSHAKE struct
instead of the SSL_HANDSHAKE_TLS13 struct. This allows the TLSv1.3 code
to access the shared handshake data without needing the SSL struct.

ok inoguchi@ tb@
lib/libssl/s3_lib.c
lib/libssl/ssl_locl.h
lib/libssl/ssl_tlsext.c
lib/libssl/tls13_client.c
lib/libssl/tls13_handshake.c
lib/libssl/tls13_internal.h
lib/libssl/tls13_legacy.c
lib/libssl/tls13_lib.c
lib/libssl/tls13_server.c