mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-28 18:32:56 +00:00
Merge pull request #4858 from hanno-arm/upstream_tls13_transforms
Upstream TLS 1.3 record transformations structure fields
This commit is contained in:
commit
5e344563e4
@ -1328,10 +1328,24 @@ struct mbedtls_ssl_context
|
||||
/*
|
||||
* Record layer transformations
|
||||
*/
|
||||
mbedtls_ssl_transform *MBEDTLS_PRIVATE(transform_in); /*!< current transform params (in) */
|
||||
mbedtls_ssl_transform *MBEDTLS_PRIVATE(transform_out); /*!< current transform params (in) */
|
||||
mbedtls_ssl_transform *MBEDTLS_PRIVATE(transform); /*!< negotiated transform params */
|
||||
mbedtls_ssl_transform *MBEDTLS_PRIVATE(transform_negotiate); /*!< transform params in negotiation */
|
||||
mbedtls_ssl_transform *MBEDTLS_PRIVATE(transform_in); /*!< current transform params (in)
|
||||
* This is always a reference,
|
||||
* never an owning pointer. */
|
||||
mbedtls_ssl_transform *MBEDTLS_PRIVATE(transform_out); /*!< current transform params (out)
|
||||
* This is always a reference,
|
||||
* never an owning pointer. */
|
||||
mbedtls_ssl_transform *MBEDTLS_PRIVATE(transform); /*!< negotiated transform params
|
||||
* This pointer owns the transform
|
||||
* it references. */
|
||||
mbedtls_ssl_transform *MBEDTLS_PRIVATE(transform_negotiate); /*!< transform params in negotiation
|
||||
* This pointer owns the transform
|
||||
* it references. */
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL)
|
||||
/*! The application data transform in TLS 1.3.
|
||||
* This pointer owns the transform it references. */
|
||||
mbedtls_ssl_transform *MBEDTLS_PRIVATE(transform_application);
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */
|
||||
|
||||
/*
|
||||
* Timers
|
||||
|
@ -562,6 +562,13 @@ struct mbedtls_ssl_handshake_params
|
||||
uint16_t mtu; /*!< Handshake mtu, used to fragment outgoing messages */
|
||||
#endif /* MBEDTLS_SSL_PROTO_DTLS */
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL)
|
||||
/*! TLS 1.3 transforms for 0-RTT and encrypted handshake messages.
|
||||
* Those pointers own the transforms they reference. */
|
||||
mbedtls_ssl_transform *transform_handshake;
|
||||
mbedtls_ssl_transform *transform_earlydata;
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */
|
||||
|
||||
/*
|
||||
* Checksum contexts
|
||||
*/
|
||||
|
@ -5495,6 +5495,13 @@ void mbedtls_ssl_handshake_free( mbedtls_ssl_context *ssl )
|
||||
handle_buffer_resizing( ssl, 1, mbedtls_ssl_get_input_buflen( ssl ),
|
||||
mbedtls_ssl_get_output_buflen( ssl ) );
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL)
|
||||
mbedtls_free( handshake->transform_earlydata );
|
||||
mbedtls_free( handshake->transform_handshake );
|
||||
handshake->transform_earlydata = NULL;
|
||||
handshake->transform_handshake = NULL;
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */
|
||||
}
|
||||
|
||||
void mbedtls_ssl_session_free( mbedtls_ssl_session *session )
|
||||
@ -6193,6 +6200,11 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl )
|
||||
mbedtls_free( ssl->session_negotiate );
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL)
|
||||
mbedtls_ssl_transform_free( ssl->transform_application );
|
||||
mbedtls_free( ssl->transform_application );
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */
|
||||
|
||||
if( ssl->session )
|
||||
{
|
||||
mbedtls_ssl_session_free( ssl->session );
|
||||
|
Loading…
x
Reference in New Issue
Block a user