ssl_ciphersuite: Added getter methods for ciphersuite id.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
Minos Galanakis 2024-03-04 02:19:31 +00:00
parent 2c8c364ac2
commit 358b448d72
2 changed files with 8 additions and 2 deletions

View File

@ -2724,7 +2724,8 @@ static inline int mbedtls_ssl_session_get_ticket_creation_time(
*
* \return The address of the session-id buffer.
*/
static inline const unsigned char[32]* mbedtls_ssl_session_get_id(const mbedtls_ssl_session *session)
static inline unsigned const char (*mbedtls_ssl_session_get_id(const mbedtls_ssl_session *
session))[32]
{
return &session->MBEDTLS_PRIVATE(id);
}
@ -2736,7 +2737,7 @@ static inline const unsigned char[32]* mbedtls_ssl_session_get_id(const mbedtls_
*
* \return size_t size of session-id buffer.
*/
static inline const size_t mbedtls_ssl_session_get_id_len(const mbedtls_ssl_session *session)
static inline size_t mbedtls_ssl_session_get_id_len(const mbedtls_ssl_session *session)
{
return session->MBEDTLS_PRIVATE(id_len);
}

View File

@ -468,6 +468,11 @@ 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)
{
return info->MBEDTLS_PRIVATE(id);
}
size_t mbedtls_ssl_ciphersuite_get_cipher_key_bitlen(const mbedtls_ssl_ciphersuite_t *info);
#ifdef __cplusplus