ts_params->mbuf_ol_pool = rte_pktmbuf_offload_pool_create(
"MBUF_OFFLOAD_POOL",
NUM_MBUFS, MBUF_CACHE_SIZE,
- DEFAULT_NUM_XFORMS * sizeof(struct rte_crypto_xform),
+ DEFAULT_NUM_XFORMS *
+ sizeof(struct rte_crypto_xform),
rte_socket_id());
if (ts_params->mbuf_ol_pool == NULL) {
RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n");
/* ***** AES-CBC / HMAC-SHA1 Hash Tests ***** */
static const uint8_t catch_22_quote_2_512_bytes_AES_CBC_ciphertext[] = {
- 0x8B, 0X4D, 0XDA, 0X1B, 0XCF, 0X04, 0XA0, 0X31,
- 0XB4, 0XBF, 0XBD, 0X68, 0X43, 0X20, 0X7E, 0X76,
- 0XB1, 0X96, 0X8B, 0XA2, 0X7C, 0XA2, 0X83, 0X9E,
- 0X39, 0X5A, 0X2F, 0X7E, 0X92, 0XB4, 0X48, 0X1A,
- 0X3F, 0X6B, 0X5D, 0XDF, 0X52, 0X85, 0X5F, 0X8E,
- 0X42, 0X3C, 0XFB, 0XE9, 0X1A, 0X24, 0XD6, 0X08,
- 0XDD, 0XFD, 0X16, 0XFB, 0XE9, 0X55, 0XEF, 0XF0,
- 0XA0, 0X8D, 0X13, 0XAB, 0X81, 0XC6, 0X90, 0X01,
- 0XB5, 0X18, 0X84, 0XB3, 0XF6, 0XE6, 0X11, 0X57,
- 0XD6, 0X71, 0XC6, 0X3C, 0X3F, 0X2F, 0X33, 0XEE,
- 0X24, 0X42, 0X6E, 0XAC, 0X0B, 0XCA, 0XEC, 0XF9,
- 0X84, 0XF8, 0X22, 0XAA, 0X60, 0XF0, 0X32, 0XA9,
- 0X75, 0X75, 0X3B, 0XCB, 0X70, 0X21, 0X0A, 0X8D,
- 0X0F, 0XE0, 0XC4, 0X78, 0X2B, 0XF8, 0X97, 0XE3,
- 0XE4, 0X26, 0X4B, 0X29, 0XDA, 0X88, 0XCD, 0X46,
- 0XEC, 0XAA, 0XF9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0x6A, 0xA6, 0x46, 0x84, 0x2E, 0xF6,
+ 0x4B, 0xDC, 0x9B, 0x8F, 0x9B, 0x8F, 0xEE, 0xB4,
+ 0xAA, 0x3F, 0xEE, 0xC0, 0x37, 0x27, 0x76, 0xC7,
+ 0x95, 0xBB, 0x26, 0x74, 0x69, 0x12, 0x7F, 0xF1,
+ 0xBB, 0xFF, 0xAE, 0xB5, 0x99, 0x6E, 0xCB, 0x0C
};
static const uint8_t catch_22_quote_2_512_bytes_AES_CBC_HMAC_SHA1_digest[] = {
- 0x9a, 0X4f, 0X88, 0X1b, 0Xb6, 0X8f, 0Xd8, 0X60,
- 0X42, 0X1a, 0X7d, 0X3d, 0Xf5, 0X82, 0X80, 0Xf1,
- 0X18, 0X8c, 0X1d, 0X32 };
+ 0x9a, 0x4f, 0x88, 0x1b, 0xb6, 0x8f, 0xd8, 0x60,
+ 0x42, 0x1a, 0x7d, 0x3d, 0xf5, 0x82, 0x80, 0xf1,
+ 0x18, 0x8c, 0x1d, 0x32
+};
static int
ut_params->cipher_xform.cipher.key.length = CIPHER_KEY_LENGTH_AES_CBC;
/* Setup HMAC Parameters */
-
ut_params->auth_xform.type = RTE_CRYPTO_XFORM_AUTH;
ut_params->auth_xform.next = NULL;
ut_params->auth_xform.auth.key.data = hmac_sha1_key;
ut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA1;
- /* Create Crypto session*/
- ut_params->sess = rte_cryptodev_session_create(ts_params->valid_devs[0],
+ /* Create crypto session*/
+ ut_params->sess = rte_cryptodev_session_create(
+ ts_params->valid_devs[0],
&ut_params->cipher_xform);
TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
CIPHER_IV_LENGTH_AES_CBC,
catch_22_quote_2_512_bytes_AES_CBC_ciphertext,
QUOTE_512_BYTES,
- "Ciphertext data not as expected");
+ "ciphertext data not as expected");
TEST_ASSERT_BUFFERS_ARE_EQUAL(
rte_pktmbuf_mtod(ut_params->obuf, uint8_t *) +
TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
"Digest verification failed");
-
return TEST_SUCCESS;
}
DIGEST_BYTE_LENGTH_SHA512,
"Generated digest data not as expected");
-
return TEST_SUCCESS;
}
ut_params->auth_xform.auth.key.data = hmac_sha512_key;
ut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA512;
ut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA512;
+
return TEST_SUCCESS;
}
TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS,
"Digest verification failed");
-
-
return TEST_SUCCESS;
}