.
On 01/05/2016 18:21, Nicolas Morey-Chaisemartin wrote:
Copy the expected digest at the end of the plaintext
to validate Auth decode functions
Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]>
---
test/validation/crypto/odp_crypto_test_inp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/test/validation/crypto/odp_crypto_test_inp.c
b/test/validation/crypto/odp_crypto_test_inp.c
index b6fcb12..dc3ee52 100644
--- a/test/validation/crypto/odp_crypto_test_inp.c
+++ b/test/validation/crypto/odp_crypto_test_inp.c
@@ -81,6 +81,11 @@ static void alg_test(odp_crypto_op_t op,
memcpy(data_addr, plaintext, plaintext_len);
int data_off = 0;
+ if (op == ODP_CRYPTO_OP_DECODE && auth_alg != ODP_AUTH_ALG_NULL) {
+ /* Copy the digest at the end of the message */
+ memcpy(data_addr + plaintext_len, digest, digest_len);
+ }
+
/* Prepare input/output params */
odp_crypto_op_params_t op_params;
memset(&op_params, 0, sizeof(op_params));
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp