diff --git a/include/mbedtls/x509.h b/include/mbedtls/x509.h index 0fedd3ffa7..fca706f13b 100644 --- a/include/mbedtls/x509.h +++ b/include/mbedtls/x509.h @@ -323,7 +323,7 @@ int mbedtls_x509_dn_gets(char *buf, size_t size, const mbedtls_x509_name *dn); convert * \return A pointer to a string containing the pk_key_type. */ -const char *pk_key_type_to_string(const mbedtls_pk_context *pk); +const char *mbedtls_pk_key_type_to_string(const mbedtls_pk_context *pk); /** * \brief Convert the certificate DN string \p name into diff --git a/library/x509.c b/library/x509.c index b55214f076..6ec1bb13df 100644 --- a/library/x509.c +++ b/library/x509.c @@ -125,7 +125,7 @@ int mbedtls_x509_get_alg(unsigned char **p, const unsigned char *end, /* * Convert pk_key_type to a string */ -const char *pk_key_type_to_string(const mbedtls_pk_context *pk) +const char *mbedtls_pk_key_type_to_string(const mbedtls_pk_context *pk) { psa_key_type_t key_type; diff --git a/library/x509_crt.c b/library/x509_crt.c index d6411c6fe1..48ebb12bab 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -1806,7 +1806,7 @@ int mbedtls_x509_crt_info(char *buf, size_t size, const char *prefix, /* Key size */ if ((ret = mbedtls_x509_key_size_helper(key_size_str, MBEDTLS_BEFORE_COLON, - pk_key_type_to_string(&crt->pk))) != 0) { + mbedtls_pk_key_type_to_string(&crt->pk))) != 0) { return ret; } diff --git a/library/x509_csr.c b/library/x509_csr.c index 781d73804b..94b22372ed 100644 --- a/library/x509_csr.c +++ b/library/x509_csr.c @@ -551,7 +551,7 @@ int mbedtls_x509_csr_info(char *buf, size_t size, const char *prefix, MBEDTLS_X509_SAFE_SNPRINTF; if ((ret = mbedtls_x509_key_size_helper(key_size_str, MBEDTLS_BEFORE_COLON, - pk_key_type_to_string(&csr->pk))) != 0) { + mbedtls_pk_key_type_to_string(&csr->pk))) != 0) { return ret; } diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index c359d16586..b2db36f676 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -1770,7 +1770,7 @@ usage: mbedtls_printf(" ok (key type: %s)\n", strlen(opt.key_file) || strlen(opt.key_opaque_alg1) ? - pk_key_type_to_string(&pkey) : "none"); + mbedtls_pk_key_type_to_string(&pkey) : "none"); #endif /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */ /* diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index ec5c0413f9..a44c38c436 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -2723,8 +2723,8 @@ usage: } mbedtls_printf(" ok (key types: %s, %s)\n", - key_cert_init ? pk_key_type_to_string(&pkey) : "none", - key_cert_init2 ? pk_key_type_to_string(&pkey2) : "none"); + key_cert_init ? mbedtls_pk_key_type_to_string(&pkey) : "none", + key_cert_init2 ? mbedtls_pk_key_type_to_string(&pkey2) : "none"); #endif /* MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED */ #if defined(SNI_OPTION)