mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-10-31 21:50:31 +03:00
Merge branch 'development-restricted' into mbedtls-3.1.0rc-pr
This commit is contained in:
@@ -44,6 +44,8 @@ psa_status_t mbedtls_test_transparent_cipher_encrypt(
|
||||
const uint8_t *key_buffer,
|
||||
size_t key_buffer_size,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *iv,
|
||||
size_t iv_length,
|
||||
const uint8_t *input,
|
||||
size_t input_length,
|
||||
uint8_t *output,
|
||||
@@ -68,19 +70,17 @@ psa_status_t mbedtls_test_transparent_cipher_encrypt(
|
||||
if( mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
|
||||
return( mbedtls_test_driver_cipher_hooks.forced_status );
|
||||
|
||||
psa_generate_random( output, PSA_CIPHER_IV_LENGTH( attributes->core.type, alg ) );
|
||||
|
||||
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
|
||||
defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_CIPHER)
|
||||
return( libtestdriver1_mbedtls_psa_cipher_encrypt(
|
||||
(const libtestdriver1_psa_key_attributes_t *)attributes,
|
||||
key_buffer, key_buffer_size,
|
||||
alg, input, input_length,
|
||||
alg, iv, iv_length, input, input_length,
|
||||
output, output_size, output_length ) );
|
||||
#elif defined(MBEDTLS_PSA_BUILTIN_CIPHER)
|
||||
return( mbedtls_psa_cipher_encrypt(
|
||||
attributes, key_buffer, key_buffer_size,
|
||||
alg, input, input_length,
|
||||
alg, iv, iv_length, input, input_length,
|
||||
output, output_size, output_length ) );
|
||||
#endif
|
||||
|
||||
@@ -314,6 +314,7 @@ psa_status_t mbedtls_test_opaque_cipher_encrypt(
|
||||
const psa_key_attributes_t *attributes,
|
||||
const uint8_t *key, size_t key_length,
|
||||
psa_algorithm_t alg,
|
||||
const uint8_t *iv, size_t iv_length,
|
||||
const uint8_t *input, size_t input_length,
|
||||
uint8_t *output, size_t output_size, size_t *output_length)
|
||||
{
|
||||
@@ -321,6 +322,8 @@ psa_status_t mbedtls_test_opaque_cipher_encrypt(
|
||||
(void) key;
|
||||
(void) key_length;
|
||||
(void) alg;
|
||||
(void) iv;
|
||||
(void) iv_length;
|
||||
(void) input;
|
||||
(void) input_length;
|
||||
(void) output;
|
||||
|
||||
Reference in New Issue
Block a user