ssl: Added session getter for ciphersuite_id.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
Minos Galanakis 2024-03-04 15:24:51 +00:00
parent 358b448d72
commit 40d4708f17
2 changed files with 13 additions and 1 deletions

View File

@ -2742,6 +2742,18 @@ static inline size_t mbedtls_ssl_session_get_id_len(const mbedtls_ssl_session *s
return session->MBEDTLS_PRIVATE(id_len);
}
/**
* \brief Get the ciphersuite-id.
*
* \param session SSL session.
*
* \return int represetation for ciphersuite.
*/
static inline int mbedtls_ssl_session_get_ciphersuite_id(const mbedtls_ssl_session *session)
{
return session->MBEDTLS_PRIVATE(ciphersuite);
}
/**
* \brief Configure a key export callback.
* (Default: none.)

View File

@ -468,7 +468,7 @@ static inline const char *mbedtls_ssl_ciphersuite_get_name(const mbedtls_ssl_cip
return info->MBEDTLS_PRIVATE(name);
}
static inline const int mbedtls_ssl_ciphersuite_get_id(const mbedtls_ssl_ciphersuite_t *info)
static inline int mbedtls_ssl_ciphersuite_get_id(const mbedtls_ssl_ciphersuite_t *info)
{
return info->MBEDTLS_PRIVATE(id);
}