mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-01 21:54:19 +01:00
Allow skipping vectors w/ non-12-byte IV AES-GCM on ALT
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
parent
d588ea1704
commit
82645b153d
@ -4097,6 +4097,16 @@ void aead_encrypt( int key_type_arg, data_t *key_data,
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
#endif /* AES could be alternatively implemented */
|
#endif /* AES could be alternatively implemented */
|
||||||
|
#if defined(MBEDTLS_GCM_ALT) || \
|
||||||
|
defined(MBEDTLS_PSA_ACCEL_ALG_GCM)
|
||||||
|
if( status == PSA_ERROR_NOT_SUPPORTED &&
|
||||||
|
(alg & ~PSA_ALG_AEAD_TAG_LENGTH_MASK) == PSA_ALG_GCM &&
|
||||||
|
nonce->len != 12 )
|
||||||
|
{
|
||||||
|
test_skip( "AES-GCM with non-12-byte IV is not supported", __LINE__, __FILE__ );
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
#endif /* AES-GCM could be alternatively implemented */
|
||||||
|
|
||||||
PSA_ASSERT( status );
|
PSA_ASSERT( status );
|
||||||
ASSERT_COMPARE( expected_result->x, expected_result->len,
|
ASSERT_COMPARE( expected_result->x, expected_result->len,
|
||||||
@ -4165,6 +4175,16 @@ void aead_decrypt( int key_type_arg, data_t *key_data,
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
#endif /* AES could be alternatively implemented */
|
#endif /* AES could be alternatively implemented */
|
||||||
|
#if defined(MBEDTLS_GCM_ALT) || \
|
||||||
|
defined(MBEDTLS_PSA_ACCEL_ALG_GCM)
|
||||||
|
if( status == PSA_ERROR_NOT_SUPPORTED &&
|
||||||
|
(alg & ~PSA_ALG_AEAD_TAG_LENGTH_MASK) == PSA_ALG_GCM &&
|
||||||
|
nonce->len != 12 )
|
||||||
|
{
|
||||||
|
test_skip( "AES-GCM with non-12-byte IV is not supported", __LINE__, __FILE__ );
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
#endif /* AES-GCM could be alternatively implemented */
|
||||||
|
|
||||||
TEST_EQUAL( status, expected_result );
|
TEST_EQUAL( status, expected_result );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user