git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test/event_crypto: fix missing IV for AES
[dpdk.git]
/
app
/
test
/
test_event_crypto_adapter.c
diff --git
a/app/test/test_event_crypto_adapter.c
b/app/test/test_event_crypto_adapter.c
index
652e458
..
bf83a63
100644
(file)
--- a/
app/test/test_event_crypto_adapter.c
+++ b/
app/test/test_event_crypto_adapter.c
@@
-171,6
+171,7
@@
test_op_forward_mode(uint8_t session_less)
struct rte_event ev;
uint32_t cap;
int ret;
struct rte_event ev;
uint32_t cap;
int ret;
+ uint8_t cipher_key[17];
memset(&m_data, 0, sizeof(m_data));
memset(&m_data, 0, sizeof(m_data));
@@
-186,6
+187,11
@@
test_op_forward_mode(uint8_t session_less)
cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+ cipher_xform.cipher.key.data = cipher_key;
+ cipher_xform.cipher.key.length = 16;
+ cipher_xform.cipher.iv.offset = IV_OFFSET;
+ cipher_xform.cipher.iv.length = 16;
+
op = rte_crypto_op_alloc(params.op_mpool,
RTE_CRYPTO_OP_TYPE_SYMMETRIC);
TEST_ASSERT_NOT_NULL(op,
op = rte_crypto_op_alloc(params.op_mpool,
RTE_CRYPTO_OP_TYPE_SYMMETRIC);
TEST_ASSERT_NOT_NULL(op,
@@
-364,6
+370,7
@@
test_op_new_mode(uint8_t session_less)
struct rte_mbuf *m;
uint32_t cap;
int ret;
struct rte_mbuf *m;
uint32_t cap;
int ret;
+ uint8_t cipher_key[17];
memset(&m_data, 0, sizeof(m_data));
memset(&m_data, 0, sizeof(m_data));
@@
-379,6
+386,11
@@
test_op_new_mode(uint8_t session_less)
cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+ cipher_xform.cipher.key.data = cipher_key;
+ cipher_xform.cipher.key.length = 16;
+ cipher_xform.cipher.iv.offset = IV_OFFSET;
+ cipher_xform.cipher.iv.length = 16;
+
op = rte_crypto_op_alloc(params.op_mpool,
RTE_CRYPTO_OP_TYPE_SYMMETRIC);
TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");
op = rte_crypto_op_alloc(params.op_mpool,
RTE_CRYPTO_OP_TYPE_SYMMETRIC);
TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");