mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-12 18:04:39 +08:00
Fix encrypt/decrypt confusion
The values are the same for all supported mechanisms (RSA-based), so no semantic change. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
cbd2cbb408
commit
f50cd59b51
@ -364,9 +364,9 @@ static int exercise_asymmetric_encryption_key(mbedtls_svc_key_id_t key,
|
|||||||
psa_key_usage_t usage,
|
psa_key_usage_t usage,
|
||||||
psa_algorithm_t alg)
|
psa_algorithm_t alg)
|
||||||
{
|
{
|
||||||
unsigned char plaintext[PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE] =
|
unsigned char plaintext[PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE] =
|
||||||
"Hello, world...";
|
"Hello, world...";
|
||||||
unsigned char ciphertext[PSA_ASYMMETRIC_DECRYPT_OUTPUT_MAX_SIZE] =
|
unsigned char ciphertext[PSA_ASYMMETRIC_ENCRYPT_OUTPUT_MAX_SIZE] =
|
||||||
"(wabblewebblewibblewobblewubble)";
|
"(wabblewebblewibblewobblewubble)";
|
||||||
size_t ciphertext_length = sizeof(ciphertext);
|
size_t ciphertext_length = sizeof(ciphertext);
|
||||||
size_t plaintext_length = 16;
|
size_t plaintext_length = 16;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user