mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-08 06:40:16 -04:00
Merge pull request #1175 from davidhorstmann-arm/cipher-multipart-test-fix-backport
[Backport 2.28] Fix a multipart test that overwrites the same buffer twice
This commit is contained in:
commit
4fc2b9b80f
@ -1971,6 +1971,11 @@ PSA symmetric encrypt/decrypt multipart: AES-CBC-nopad, 16 bytes, good
|
||||
depends_on:PSA_WANT_ALG_CBC_NO_PADDING:PSA_WANT_KEY_TYPE_AES
|
||||
cipher_verify_output_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":16
|
||||
|
||||
# Encrypt 48 bytes total, initially 16. This forces both calls to update() to output data.
|
||||
PSA symmetric encrypt/decrypt multipart: AES-CBC-nopad, 48 bytes, good
|
||||
depends_on:PSA_WANT_ALG_CBC_NO_PADDING:PSA_WANT_KEY_TYPE_AES
|
||||
cipher_verify_output_multipart:PSA_ALG_CBC_NO_PADDING:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a6bc1bee22e409f96e93d7e117393172a6bc1bee22e409f96e93d7e117393172a":16
|
||||
|
||||
PSA symmetric encrypt/decrypt multipart: AES-CBC-PKCS#7, 16 bytes
|
||||
depends_on:PSA_WANT_ALG_CBC_PKCS7:PSA_WANT_KEY_TYPE_AES
|
||||
cipher_verify_output_multipart:PSA_ALG_CBC_PKCS7:PSA_KEY_TYPE_AES:"2b7e151628aed2a6abf7158809cf4f3c":"6bc1bee22e409f96e93d7e117393172a":16
|
||||
|
@ -3291,7 +3291,8 @@ void cipher_verify_output_multipart(int alg_arg,
|
||||
PSA_ASSERT(psa_cipher_update(&operation1,
|
||||
input->x + first_part_size,
|
||||
input->len - first_part_size,
|
||||
output1, output1_buffer_size,
|
||||
output1 + output1_length,
|
||||
output1_buffer_size - output1_length,
|
||||
&function_output_length));
|
||||
TEST_LE_U(function_output_length,
|
||||
PSA_CIPHER_UPDATE_OUTPUT_SIZE(key_type,
|
||||
@ -3337,7 +3338,8 @@ void cipher_verify_output_multipart(int alg_arg,
|
||||
PSA_ASSERT(psa_cipher_update(&operation2,
|
||||
output1 + first_part_size,
|
||||
output1_length - first_part_size,
|
||||
output2, output2_buffer_size,
|
||||
output2 + output2_length,
|
||||
output2_buffer_size - output2_length,
|
||||
&function_output_length));
|
||||
TEST_LE_U(function_output_length,
|
||||
PSA_CIPHER_UPDATE_OUTPUT_SIZE(key_type,
|
||||
|
Loading…
x
Reference in New Issue
Block a user