mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-16 13:20:51 +00:00
ssl: Added getter methods for session id and len.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
e33b349c90
commit
2c8c364ac2
@ -2717,6 +2717,30 @@ static inline int mbedtls_ssl_session_get_ticket_creation_time(
|
||||
#endif /* MBEDTLS_HAVE_TIME */
|
||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_SRV_C */
|
||||
|
||||
/**
|
||||
* \brief Get the session-id buffer.
|
||||
*
|
||||
* \param session SSL session.
|
||||
*
|
||||
* \return The address of the session-id buffer.
|
||||
*/
|
||||
static inline const unsigned char[32]* mbedtls_ssl_session_get_id(const mbedtls_ssl_session *session)
|
||||
{
|
||||
return &session->MBEDTLS_PRIVATE(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the size of the session-id.
|
||||
*
|
||||
* \param session SSL session.
|
||||
*
|
||||
* \return size_t size of session-id buffer.
|
||||
*/
|
||||
static inline const size_t mbedtls_ssl_session_get_id_len(const mbedtls_ssl_session *session)
|
||||
{
|
||||
return session->MBEDTLS_PRIVATE(id_len);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Configure a key export callback.
|
||||
* (Default: none.)
|
||||
|
Loading…
x
Reference in New Issue
Block a user