Skip to content

Commit

Permalink
Use the same guard for if using PSA crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
Skptak committed Dec 11, 2023
1 parent 7297a7f commit 2285c93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/portable/mbedtls/core_pkcs11_mbedtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#ifdef MBEDTLS_PSA_CRYPTO_C
#include "psa/crypto.h"
#include "psa/crypto_values.h"
#endif
#endif /* MBEDTLS_PSA_CRYPTO_C */

/* C runtime includes. */
#include <string.h>
Expand Down Expand Up @@ -490,7 +490,7 @@ static CK_RV prvMbedTLS_Initialize( void )
}
else
{
#ifdef MBEDTLS_USE_PSA_CRYPTO
#ifdef MBEDTLS_PSA_CRYPTO_C
lMbedTLSResult = psa_crypto_init();

if( lMbedTLSResult != PSA_SUCCESS )
Expand All @@ -508,7 +508,7 @@ static CK_RV prvMbedTLS_Initialize( void )
{
LogDebug( ( "MbedTLS PSA module was successfully initialized." ) );
}
#endif /* MBEDTLS_USE_PSA_CRYPTO */
#endif /* MBEDTLS_PSA_CRYPTO_C */

/* MISRA Ref 10.5.1 [Essential type casting] */
/* More details at: https://github.com/FreeRTOS/corePKCS11/blob/main/MISRA.md#rule-105 */
Expand Down

0 comments on commit 2285c93

Please sign in to comment.