Add missing cipher mode translations for PSA
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
parent
f257a6e8f8
commit
a706e5e317
1 changed files with 8 additions and 0 deletions
|
@ -51,6 +51,9 @@ static inline psa_key_type_t mbedtls_psa_translate_cipher_type(
|
|||
case MBEDTLS_CIPHER_AES_128_CCM:
|
||||
case MBEDTLS_CIPHER_AES_192_CCM:
|
||||
case MBEDTLS_CIPHER_AES_256_CCM:
|
||||
case MBEDTLS_CIPHER_AES_128_CCM_STAR_NO_TAG:
|
||||
case MBEDTLS_CIPHER_AES_192_CCM_STAR_NO_TAG:
|
||||
case MBEDTLS_CIPHER_AES_256_CCM_STAR_NO_TAG:
|
||||
case MBEDTLS_CIPHER_AES_128_GCM:
|
||||
case MBEDTLS_CIPHER_AES_192_GCM:
|
||||
case MBEDTLS_CIPHER_AES_256_GCM:
|
||||
|
@ -66,6 +69,9 @@ static inline psa_key_type_t mbedtls_psa_translate_cipher_type(
|
|||
/* case MBEDTLS_CIPHER_ARIA_128_CCM:
|
||||
case MBEDTLS_CIPHER_ARIA_192_CCM:
|
||||
case MBEDTLS_CIPHER_ARIA_256_CCM:
|
||||
case MBEDTLS_CIPHER_ARIA_128_CCM_STAR_NO_TAG:
|
||||
case MBEDTLS_CIPHER_ARIA_192_CCM_STAR_NO_TAG:
|
||||
case MBEDTLS_CIPHER_ARIA_256_CCM_STAR_NO_TAG:
|
||||
case MBEDTLS_CIPHER_ARIA_128_GCM:
|
||||
case MBEDTLS_CIPHER_ARIA_192_GCM:
|
||||
case MBEDTLS_CIPHER_ARIA_256_GCM:
|
||||
|
@ -90,6 +96,8 @@ static inline psa_algorithm_t mbedtls_psa_translate_cipher_mode(
|
|||
return( PSA_ALG_AEAD_WITH_SHORTENED_TAG( PSA_ALG_GCM, taglen ) );
|
||||
case MBEDTLS_MODE_CCM:
|
||||
return( PSA_ALG_AEAD_WITH_SHORTENED_TAG( PSA_ALG_CCM, taglen ) );
|
||||
case MBEDTLS_MODE_CCM_STAR_NO_TAG:
|
||||
return PSA_ALG_CCM_STAR_NO_TAG;
|
||||
case MBEDTLS_MODE_CBC:
|
||||
if( taglen == 0 )
|
||||
return( PSA_ALG_CBC_NO_PADDING );
|
||||
|
|
Loading…
Reference in a new issue