mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-27 06:35:22 +00:00
add set in/out transform utils
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
d3f73349a7
commit
c7875b5f11
@ -986,6 +986,14 @@ void mbedtls_ssl_transform_free( mbedtls_ssl_transform *transform );
|
||||
*/
|
||||
void mbedtls_ssl_handshake_free( mbedtls_ssl_context *ssl );
|
||||
|
||||
/* set inbound transform of ssl context */
|
||||
void mbedtls_ssl_set_inbound_transform( mbedtls_ssl_context *ssl,
|
||||
mbedtls_ssl_transform *transform );
|
||||
|
||||
/* set outbound transform of ssl context */
|
||||
void mbedtls_ssl_set_outbound_transform( mbedtls_ssl_context *ssl,
|
||||
mbedtls_ssl_transform *transform );
|
||||
|
||||
int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl );
|
||||
int mbedtls_ssl_handshake_server_step( mbedtls_ssl_context *ssl );
|
||||
void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl );
|
||||
|
@ -5551,6 +5551,23 @@ void mbedtls_ssl_transform_free( mbedtls_ssl_transform *transform )
|
||||
mbedtls_platform_zeroize( transform, sizeof( mbedtls_ssl_transform ) );
|
||||
}
|
||||
|
||||
void mbedtls_ssl_set_inbound_transform( mbedtls_ssl_context *ssl,
|
||||
mbedtls_ssl_transform *transform )
|
||||
{
|
||||
if( ssl->transform_in == transform )
|
||||
return;
|
||||
|
||||
ssl->transform_in = transform;
|
||||
mbedtls_platform_zeroize( ssl->in_ctr, 8 );
|
||||
}
|
||||
|
||||
void mbedtls_ssl_set_outbound_transform( mbedtls_ssl_context *ssl,
|
||||
mbedtls_ssl_transform *transform )
|
||||
{
|
||||
ssl->transform_out = transform;
|
||||
mbedtls_platform_zeroize( ssl->cur_out_ctr, 8 );
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||
|
||||
void mbedtls_ssl_buffering_free( mbedtls_ssl_context *ssl )
|
||||
|
Loading…
x
Reference in New Issue
Block a user