Take advantage of legacy_or_psa.h being public
Opportunities for using the macros were spotted using: git grep -E -n -A2 'MBEDTLS_(MD|SHA)[0-9]+_C' | egrep 'PSA_WANT_ALG_(MD|SHA)' then manually filtering the results. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
07018f97d2
commit
e896705c1a
4 changed files with 13 additions and 38 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "mbedtls/private_access.h"
|
||||
|
||||
#include "mbedtls/build_info.h"
|
||||
#include "mbedtls/legacy_or_psa.h"
|
||||
|
||||
#include "mbedtls/x509.h"
|
||||
#include "mbedtls/x509_crl.h"
|
||||
|
@ -1108,7 +1109,7 @@ int mbedtls_x509write_crt_set_extension( mbedtls_x509write_cert *ctx,
|
|||
int mbedtls_x509write_crt_set_basic_constraints( mbedtls_x509write_cert *ctx,
|
||||
int is_ca, int max_pathlen );
|
||||
|
||||
#if defined(MBEDTLS_SHA1_C) || ( defined(MBEDTLS_PSA_CRYPTO_C) && defined(PSA_WANT_ALG_SHA_1) )
|
||||
#if defined(MBEDTLS_HAS_ALG_SHA_1_VIA_LOWLEVEL_OR_PSA)
|
||||
/**
|
||||
* \brief Set the subjectKeyIdentifier extension for a CRT
|
||||
* Requires that mbedtls_x509write_crt_set_subject_key() has been
|
||||
|
@ -1130,7 +1131,7 @@ int mbedtls_x509write_crt_set_subject_key_identifier( mbedtls_x509write_cert *ct
|
|||
* \return 0 if successful, or a MBEDTLS_ERR_X509_ALLOC_FAILED
|
||||
*/
|
||||
int mbedtls_x509write_crt_set_authority_key_identifier( mbedtls_x509write_cert *ctx );
|
||||
#endif /* MBEDTLS_SHA1_C || (MBEDTLS_PSA_CRYPTO_C && PSA_WANT_ALG_SHA_1)*/
|
||||
#endif /* MBEDTLS_HAS_ALG_SHA_1_VIA_LOWLEVEL_OR_PSA */
|
||||
|
||||
/**
|
||||
* \brief Set the Key Usage Extension flags
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue