mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-29 02:16:50 +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
2a18f56b4e
commit
aaf9944db3
|
@ -41,7 +41,7 @@
|
|||
#define BUILTIN_ALG_HMAC 1
|
||||
#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 )
|
||||
{
|
||||
switch( alg )
|
||||
|
@ -187,11 +187,7 @@ exit:
|
|||
mbedtls_platform_zeroize( tmp, hash_size );
|
||||
return( status );
|
||||
}
|
||||
#endif /* MBEDTLS_PSA_BUILTIN_ALG_HMAC || PSA_CRYPTO_DRIVER_TEST */
|
||||
|
||||
/* 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)
|
||||
#endif /* BUILTIN_ALG_HMAC */
|
||||
|
||||
#if defined(BUILTIN_ALG_CMAC)
|
||||
static psa_status_t cmac_setup( mbedtls_psa_mac_operation_t *operation,
|
||||
|
@ -221,6 +217,10 @@ exit:
|
|||
}
|
||||
#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
|
||||
* called, mbedtls_psa_mac_abort can run and will do the right thing. */
|
||||
static psa_status_t mac_init(
|
||||
|
@ -504,7 +504,7 @@ cleanup:
|
|||
|
||||
return( status );
|
||||
}
|
||||
#endif /* MBEDTLS_PSA_BUILTIN_MAC || PSA_CRYPTO_DRIVER_TEST */
|
||||
#endif /* BUILTIN_ALG_HMAC || BUILTIN_ALG_CMAC */
|
||||
|
||||
#if defined(MBEDTLS_PSA_BUILTIN_MAC)
|
||||
psa_status_t mbedtls_psa_mac_compute(
|
||||
|
|
Loading…
Reference in a new issue