This patch fixes RSA sign data length assignment to correct value.
The length was previously altered during a test scenario and is
now restored to the proper value.

Fixes: 9682e8246ae2 ("test/crypto: add negative case for RSA verification")

Signed-off-by: Nithinsen Kaithakadan <[email protected]>
---
 app/test/test_cryptodev_asym.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 111f675c94..34c15e26bc 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -139,6 +139,7 @@ queue_ops_rsa_sign_verify(void *sess)
 
        /* Negative test */
        result_op->asym->rsa.sign.data[0] ^= 0xff;
+       result_op->asym->rsa.sign.length = RTE_DIM(rsa_n);
        if (rte_cryptodev_enqueue_burst(dev_id, 0, &result_op, 1) != 1) {
                RTE_LOG(ERR, USER1, "Error sending packet for verify\n");
                status = TEST_FAILED;
-- 
2.48.1

Reply via email to