Cleanup PSA ifdefs for CBC block mode
Try to make these definitions clearer given the complexity of the mapping between the PSA config options and the MBEDTLS ones. Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
parent
10cb81c0a0
commit
fc46818eeb
@ -333,26 +333,20 @@ extern "C" {
|
|||||||
|
|
||||||
#if defined(PSA_WANT_ALG_CBC_NO_PADDING) || defined(PSA_WANT_ALG_CBC_PKCS7)
|
#if defined(PSA_WANT_ALG_CBC_NO_PADDING) || defined(PSA_WANT_ALG_CBC_PKCS7)
|
||||||
#define MBEDTLS_CIPHER_MODE_CBC
|
#define MBEDTLS_CIPHER_MODE_CBC
|
||||||
#if defined(PSA_WANT_ALG_CBC_PKCS7)
|
|
||||||
#define MBEDTLS_CIPHER_PADDING_PKCS7
|
|
||||||
#endif /* PSA_WANT_ALG_CBC_PKCS7 */
|
|
||||||
#endif /* PSA_WANT_ALG_CBC_NO_PADDING || PSA_WANT_ALG_CBC_PKCS7 */
|
#endif /* PSA_WANT_ALG_CBC_NO_PADDING || PSA_WANT_ALG_CBC_PKCS7 */
|
||||||
|
|
||||||
#if defined(PSA_WANT_ALG_CBC_NO_PADDING)
|
#if defined(PSA_WANT_ALG_CBC_NO_PADDING)
|
||||||
#if !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING) || \
|
#if !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING) || \
|
||||||
defined(PSA_HAVE_SOFT_KEY_TYPE_AES) || \
|
defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
|
||||||
defined(PSA_HAVE_SOFT_KEY_TYPE_DES) || \
|
|
||||||
defined(PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA)
|
|
||||||
#define MBEDTLS_PSA_BUILTIN_ALG_CBC_NO_PADDING 1
|
#define MBEDTLS_PSA_BUILTIN_ALG_CBC_NO_PADDING 1
|
||||||
#endif
|
#endif
|
||||||
#endif /* PSA_WANT_ALG_CBC_NO_PADDING */
|
#endif /* PSA_WANT_ALG_CBC_NO_PADDING */
|
||||||
|
|
||||||
#if defined(PSA_WANT_ALG_CBC_PKCS7)
|
#if defined(PSA_WANT_ALG_CBC_PKCS7)
|
||||||
#if !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7) || \
|
#if !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7) || \
|
||||||
defined(PSA_HAVE_SOFT_KEY_TYPE_AES) || \
|
defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
|
||||||
defined(PSA_HAVE_SOFT_KEY_TYPE_DES) || \
|
|
||||||
defined(PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA)
|
|
||||||
#define MBEDTLS_PSA_BUILTIN_ALG_CBC_PKCS7 1
|
#define MBEDTLS_PSA_BUILTIN_ALG_CBC_PKCS7 1
|
||||||
|
#define MBEDTLS_CIPHER_PADDING_PKCS7
|
||||||
#endif
|
#endif
|
||||||
#endif /* PSA_WANT_ALG_CBC_PKCS7 */
|
#endif /* PSA_WANT_ALG_CBC_PKCS7 */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user