Fix unused function warning in x509.c

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2023-06-28 16:22:50 +01:00
parent 90282149fa
commit ffabb7b7da

View File

@ -134,6 +134,8 @@ int mbedtls_x509_get_alg(unsigned char **p, const unsigned char *end,
/* /*
* Convert md type to string * Convert md type to string
*/ */
#if !defined(MBEDTLS_X509_REMOVE_INFO) && defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT)
static inline const char *md_type_to_string(mbedtls_md_type_t md_alg) static inline const char *md_type_to_string(mbedtls_md_type_t md_alg)
{ {
switch (md_alg) { switch (md_alg) {
@ -172,6 +174,8 @@ static inline const char *md_type_to_string(mbedtls_md_type_t md_alg)
} }
} }
#endif
#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) #if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT)
/* /*
* HashAlgorithm ::= AlgorithmIdentifier * HashAlgorithm ::= AlgorithmIdentifier