mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-06 19:21:05 +00:00
Use the proper define guards in the MAC driver
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
parent
2f60f20884
commit
02865f5cbb
@ -41,7 +41,7 @@
|
|||||||
#define BUILTIN_ALG_HMAC 1
|
#define BUILTIN_ALG_HMAC 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_ALG_HMAC) || defined(PSA_CRYPTO_DRIVER_TEST)
|
#if defined(BUILTIN_ALG_HMAC)
|
||||||
static size_t psa_get_hash_block_size( psa_algorithm_t alg )
|
static size_t psa_get_hash_block_size( psa_algorithm_t alg )
|
||||||
{
|
{
|
||||||
switch( alg )
|
switch( alg )
|
||||||
@ -187,11 +187,7 @@ exit:
|
|||||||
mbedtls_platform_zeroize( tmp, hash_size );
|
mbedtls_platform_zeroize( tmp, hash_size );
|
||||||
return( status );
|
return( status );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_PSA_BUILTIN_ALG_HMAC || PSA_CRYPTO_DRIVER_TEST */
|
#endif /* BUILTIN_ALG_HMAC */
|
||||||
|
|
||||||
/* Implement the PSA driver MAC interface on top of mbed TLS if either the
|
|
||||||
* software driver or the test driver requires it. */
|
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_MAC) || defined(PSA_CRYPTO_DRIVER_TEST)
|
|
||||||
|
|
||||||
#if defined(BUILTIN_ALG_CMAC)
|
#if defined(BUILTIN_ALG_CMAC)
|
||||||
static psa_status_t cmac_setup( mbedtls_psa_mac_operation_t *operation,
|
static psa_status_t cmac_setup( mbedtls_psa_mac_operation_t *operation,
|
||||||
@ -221,6 +217,10 @@ exit:
|
|||||||
}
|
}
|
||||||
#endif /* BUILTIN_ALG_CMAC */
|
#endif /* BUILTIN_ALG_CMAC */
|
||||||
|
|
||||||
|
/* Implement the PSA driver MAC interface on top of mbed TLS if either the
|
||||||
|
* software driver or the test driver requires it. */
|
||||||
|
#if defined(BUILTIN_ALG_HMAC) || defined(BUILTIN_ALG_CMAC)
|
||||||
|
|
||||||
/* Initialize this driver's MAC operation structure. Once this function has been
|
/* Initialize this driver's MAC operation structure. Once this function has been
|
||||||
* called, mbedtls_psa_mac_abort can run and will do the right thing. */
|
* called, mbedtls_psa_mac_abort can run and will do the right thing. */
|
||||||
static psa_status_t mac_init(
|
static psa_status_t mac_init(
|
||||||
@ -504,7 +504,7 @@ cleanup:
|
|||||||
|
|
||||||
return( status );
|
return( status );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_PSA_BUILTIN_MAC || PSA_CRYPTO_DRIVER_TEST */
|
#endif /* BUILTIN_ALG_HMAC || BUILTIN_ALG_CMAC */
|
||||||
|
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_MAC)
|
#if defined(MBEDTLS_PSA_BUILTIN_MAC)
|
||||||
psa_status_t mbedtls_psa_mac_compute(
|
psa_status_t mbedtls_psa_mac_compute(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user