mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Add psa_enabled
field to cipher ctx and add dummy implementations
This field determines whether a cipher context should use an external implementation of the PSA Crypto API for cryptographic operations, or Mbed TLS' own crypto library. The commit also adds dummy implementations for the cipher API.
This commit is contained in:
@ -321,6 +321,18 @@ typedef struct mbedtls_cipher_context_t
|
||||
/** CMAC-specific context. */
|
||||
mbedtls_cmac_context_t *cmac_ctx;
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
/** Indicates whether the cipher operations should be performed
|
||||
* by Mbed TLS' own crypto library or an external implementation
|
||||
* of the PSA Crypto API.
|
||||
* This is unset if the cipher context is setup through
|
||||
* mbedtls_cipher_setup(), and set if it is setup through
|
||||
* mbedtls_cipher_setup_psa().
|
||||
*/
|
||||
unsigned char psa_enabled;
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
|
||||
} mbedtls_cipher_context_t;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user