diff options
author | Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com> | 2022-01-25 00:04:18 +0100 |
---|---|---|
committer | Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com> | 2022-01-31 15:38:29 +0100 |
commit | f57b45660d8520028f06f626bf8cf9e395c7c57e (patch) | |
tree | 10edfe914c3de21c4ee7babb6775d8a0d5ab5756 | |
parent | 1d714479a3420e3f69744e5bb514392bdcaa4930 (diff) | |
download | mbedtls-f57b45660d8520028f06f626bf8cf9e395c7c57e.zip mbedtls-f57b45660d8520028f06f626bf8cf9e395c7c57e.tar.gz mbedtls-f57b45660d8520028f06f626bf8cf9e395c7c57e.tar.bz2 |
Rename tls_mbedtls_cipher_to_psa() to be consistent with function naming convention.
New function name: mbedtls_ssl_cipher_to_psa().
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
-rw-r--r-- | library/ssl_misc.h | 2 | ||||
-rw-r--r-- | library/ssl_tls.c | 6 | ||||
-rw-r--r-- | library/ssl_tls13_keys.c | 4 | ||||
-rw-r--r-- | tests/suites/test_suite_ssl.function | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/library/ssl_misc.h b/library/ssl_misc.h index 8155fb7..f3b4b9f 100644 --- a/library/ssl_misc.h +++ b/library/ssl_misc.h @@ -1305,7 +1305,7 @@ static inline mbedtls_svc_key_id_t mbedtls_ssl_get_opaque_psk( * \return PSA_SUCCESS on success or PSA_ERROR_NOT_SUPPORTED if * conversion is not supported. */ -psa_status_t tls_mbedtls_cipher_to_psa( mbedtls_cipher_type_t mbedtls_cipher_type, +psa_status_t mbedtls_ssl_cipher_to_psa( mbedtls_cipher_type_t mbedtls_cipher_type, size_t taglen, psa_algorithm_t *alg, psa_key_type_t *key_type, diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 0efdd3e..ba8a096 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -1009,14 +1009,14 @@ static int ssl_tls12_populate_transform( mbedtls_ssl_transform *transform, } #if defined(MBEDTLS_USE_PSA_CRYPTO) - if( ( status = tls_mbedtls_cipher_to_psa( cipher_info->type, + if( ( status = mbedtls_ssl_cipher_to_psa( cipher_info->type, transform->taglen, &alg, &key_type, &key_bits ) ) != PSA_SUCCESS ) { ret = psa_status_to_mbedtls( status ); - MBEDTLS_SSL_DEBUG_RET( 1, "tls_mbedtls_cipher_to_psa", ret ); + MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_cipher_to_psa", ret ); goto end; } @@ -4012,7 +4012,7 @@ int mbedtls_ssl_conf_psk_opaque( mbedtls_ssl_config *conf, return( ret ); } -psa_status_t tls_mbedtls_cipher_to_psa( mbedtls_cipher_type_t mbedtls_cipher_type, +psa_status_t mbedtls_ssl_cipher_to_psa( mbedtls_cipher_type_t mbedtls_cipher_type, size_t taglen, psa_algorithm_t *alg, psa_key_type_t *key_type, diff --git a/library/ssl_tls13_keys.c b/library/ssl_tls13_keys.c index 5f0595b..13122c8 100644 --- a/library/ssl_tls13_keys.c +++ b/library/ssl_tls13_keys.c @@ -930,13 +930,13 @@ int mbedtls_ssl_tls13_populate_transform( mbedtls_ssl_transform *transform, /* * Setup psa keys and alg */ - if( ( status = tls_mbedtls_cipher_to_psa( cipher_info->type, + if( ( status = mbedtls_ssl_cipher_to_psa( cipher_info->type, transform->taglen, &alg, &key_type, &key_bits ) ) != PSA_SUCCESS ) { - MBEDTLS_SSL_DEBUG_RET( 1, "tls_mbedtls_cipher_to_psa", psa_status_to_mbedtls( status ) ); + MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_cipher_to_psa", psa_status_to_mbedtls( status ) ); return( psa_status_to_mbedtls( status ) ); } diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index acfc3a4..91858e4 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -1431,7 +1431,7 @@ static int build_transforms( mbedtls_ssl_transform *t_in, #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */ #if defined(MBEDTLS_USE_PSA_CRYPTO) - status = tls_mbedtls_cipher_to_psa( cipher_type, + status = mbedtls_ssl_cipher_to_psa( cipher_type, t_in->taglen, &alg, &key_type, |