@@ -1133,6 +1133,9 @@ static int run_aes_cbc_hmac_sha(void *pointer)
11331133 for (i = 0 ; i < ntls ; i ++ ) {
11341134 ti .tls = (tls_v * )& test_tls [i ];
11351135#ifdef QAT_OPENSSL_PROVIDER
1136+ # ifdef QAT_INSECURE_ALGO
1137+ insecure_algorithms_enabled = 1 ;
1138+ # endif
11361139 if (
11371140 /*
11381141 * Running the test with SW implementation to check if
@@ -1142,28 +1145,37 @@ static int run_aes_cbc_hmac_sha(void *pointer)
11421145 (test_auth_header (& ti , USE_SW ) != 1 ) ||
11431146 (test_auth_pkt (& ti , USE_SW ) != 1 ) ||
11441147 (
1145- /*
1146- * Perform these tests only if engine
1147- * is present.
1148- */
1149- (test_encrypted_buffer (& ti ) != 1 ) ||
1150- (test_no_hmac_key_set (& ti ) != 1 ) ||
1151- (test_crypto_op (& ti , USE_ENGINE , USE_SW ) != 1 ) ||
1152- (test_crypto_op (& ti , USE_SW , USE_ENGINE ) != 1 ) ||
1153- (test_crypto_op (& ti , USE_ENGINE , USE_ENGINE ) != 1 ) ||
1154- (test_auth_header (& ti , USE_ENGINE ) != 1 ) ||
1155- (test_auth_pkt (& ti , USE_ENGINE ) != 1 ) ||
1156- (test_multi_op (& ti ) != 1 )
1157- /*
1158- * 1. cipher pipeline feature is not support in
1159- * qatprovider due to limitation.
1160- * 2. small package offloading is support in qat-
1161- * provider, but there's no relevant API to set
1162- * threshold in OpenSSL 3.0, so this testcase is
1163- * also deactiaved.
1164- */
1165- )
1166- ) {
1148+ /*
1149+ * Perform these tests only if engine is present.
1150+ *
1151+ * When QAT insecure algorithms are disabled, AES128_CBC_HMAC_SHA256
1152+ * implementation uses only OpenSSL.
1153+ *
1154+ * USE_SW refers OpenSSL implementation.
1155+ * USE_ENGINE refers QAT_Engine implementation.
1156+ */
1157+ (insecure_algorithms_enabled ||
1158+ args -> type != TEST_AES128_CBC_HMAC_SHA256 ) &&
1159+ (
1160+ (test_encrypted_buffer (& ti ) != 1 ) ||
1161+ (test_no_hmac_key_set (& ti ) != 1 ) ||
1162+ (test_crypto_op (& ti , USE_ENGINE , USE_SW ) != 1 ) ||
1163+ (test_crypto_op (& ti , USE_SW , USE_ENGINE ) != 1 ) ||
1164+ (test_crypto_op (& ti , USE_ENGINE , USE_ENGINE ) != 1 ) ||
1165+ (test_auth_header (& ti , USE_ENGINE ) != 1 ) ||
1166+ (test_auth_pkt (& ti , USE_ENGINE ) != 1 )
1167+ )
1168+ ) ||
1169+ (test_multi_op (& ti ) != 1 )
1170+ /*
1171+ * 1. cipher pipeline feature is not support in
1172+ * qatprovider due to limitation.
1173+ * 2. small package offloading is support in qat-
1174+ * provider, but there's no relevant API to set
1175+ * threshold in OpenSSL 3.0, so this testcase is
1176+ * also deactiaved.
1177+ */
1178+ ) {
11671179#else
11681180 if (
11691181 /*
0 commit comments