SNOW 3G Tests ***** */
| 2536 | |
| 2537 | /* ***** SNOW 3G Tests ***** */ |
| 2538 | static int |
| 2539 | create_wireless_algo_hash_session(uint8_t dev_id, |
| 2540 | const uint8_t *key, const uint8_t key_len, |
| 2541 | const uint8_t iv_len, const uint8_t auth_len, |
| 2542 | enum rte_crypto_auth_operation op, |
| 2543 | enum rte_crypto_auth_algorithm algo) |
| 2544 | { |
| 2545 | uint8_t hash_key[key_len]; |
| 2546 | |
| 2547 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 2548 | struct crypto_unittest_params *ut_params = &unittest_params; |
| 2549 | |
| 2550 | memcpy(hash_key, key, key_len); |
| 2551 | |
| 2552 | debug_hexdump(stdout, "key:", key, key_len); |
| 2553 | |
| 2554 | /* Setup Authentication Parameters */ |
| 2555 | ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH; |
| 2556 | ut_params->auth_xform.next = NULL; |
| 2557 | |
| 2558 | ut_params->auth_xform.auth.op = op; |
| 2559 | ut_params->auth_xform.auth.algo = algo; |
| 2560 | ut_params->auth_xform.auth.key.length = key_len; |
| 2561 | ut_params->auth_xform.auth.key.data = hash_key; |
| 2562 | ut_params->auth_xform.auth.digest_length = auth_len; |
| 2563 | ut_params->auth_xform.auth.iv.offset = IV_OFFSET; |
| 2564 | ut_params->auth_xform.auth.iv.length = iv_len; |
| 2565 | ut_params->sess = rte_cryptodev_sym_session_create(dev_id, |
| 2566 | &ut_params->auth_xform, ts_params->session_mpool); |
| 2567 | if (ut_params->sess == NULL && rte_errno == ENOTSUP) |
| 2568 | return TEST_SKIPPED; |
| 2569 | |
| 2570 | TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed"); |
| 2571 | return 0; |
| 2572 | } |
| 2573 | |
| 2574 | static int |
| 2575 | create_wireless_algo_cipher_session(uint8_t dev_id, |
no test coverage detected