mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Add mbedtls_ssl_get_session_pointer()
Avoid useless copy with mbedtls_ssl_get_session() before serialising. Used in ssl_client2 for testing and demonstrating usage, but unfortunately that means mbedtls_ssl_get_session() is no longer tested, which will be fixed in the next commit.
This commit is contained in:
committed by
Jarno Lamsa
parent
21548638b7
commit
b5e4e0a395
@ -9834,6 +9834,14 @@ int mbedtls_ssl_get_session( const mbedtls_ssl_context *ssl,
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_CLI_C */
|
||||
|
||||
const mbedtls_ssl_session *mbedtls_ssl_get_session_pointer( const mbedtls_ssl_context *ssl )
|
||||
{
|
||||
if( ssl == NULL )
|
||||
return( NULL );
|
||||
|
||||
return( ssl->session );
|
||||
}
|
||||
|
||||
/*
|
||||
* Serialize a session in the following format:
|
||||
* (in the presentation language of TLS, RFC 8446 section 3)
|
||||
|
Reference in New Issue
Block a user