@@ -181,11 +181,20 @@ void fips_result(void)
181181 }
182182
183183 for (i = 0 ; i < (int )OSSL_NELEM (st_kat_kdf_tests ); ++ i ) {
184- if ((qat_hw_prf_offload == 0
184+ if ((qat_hw_hkdf_offload == 0
185+ && !strcmp (st_kat_kdf_tests [i ].desc , "TLS13_KDF_EXTRACT_256" ))
186+ || (qat_hw_hkdf_offload == 0
187+ && !strcmp (st_kat_kdf_tests [i ].desc , "TLS13_KDF_EXPAND_256" ))
188+ || (qat_hw_hkdf_offload == 0
189+ && !strcmp (st_kat_kdf_tests [i ].desc , "TLS13_KDF_EXTRACT_384" ))
190+ || (qat_hw_hkdf_offload == 0
191+ && !strcmp (st_kat_kdf_tests [i ].desc , "TLS13_KDF_EXPAND_384" ))
192+ || (qat_hw_prf_offload == 0
185193 && !strcmp (st_kat_kdf_tests [i ].desc , "TLS12_PRF_256" ))
186194 || (qat_hw_prf_offload == 0
187195 && !strcmp (st_kat_kdf_tests [i ].desc , "TLS12_PRF_384" )))
188196 continue ;
197+
189198# ifdef QAT_DEBUG
190199 INFO ("\t%s : (%s) : %s\n" , qat_kdf_result -> desc [i ],
191200 qat_kdf_result -> type [i ],
@@ -308,11 +317,23 @@ void fips_result(void)
308317 }
309318
310319 for (i = 0 ; i < (int )OSSL_NELEM (st_kat_kdf_tests ); ++ i ) {
311- if ((qat_hw_prf_offload == 0
320+ if ((qat_hw_hkdf_offload == 0
321+ && !strcmp (st_kat_kdf_tests [i ].desc , "TLS13_KDF_EXTRACT_256" ))
322+ || (qat_hw_hkdf_offload == 0
323+ && !strcmp (st_kat_kdf_tests [i ].desc ,
324+ "TLS13_KDF_EXPAND_256" ))
325+ || (qat_hw_hkdf_offload == 0
326+ && !strcmp (st_kat_kdf_tests [i ].desc ,
327+ "TLS13_KDF_EXTRACT_384" ))
328+ || (qat_hw_hkdf_offload == 0
329+ && !strcmp (st_kat_kdf_tests [i ].desc ,
330+ "TLS13_KDF_EXPAND_384" ))
331+ || (qat_hw_prf_offload == 0
312332 && !strcmp (st_kat_kdf_tests [i ].desc , "TLS12_PRF_256" ))
313333 || (qat_hw_prf_offload == 0
314334 && !strcmp (st_kat_kdf_tests [i ].desc , "TLS12_PRF_384" )))
315335 continue ;
336+
316337# ifdef QAT_DEBUG
317338 INFO ("\t%s : (%s) : %s\n" , qat_async_kdf_result -> desc [i ],
318339 qat_async_kdf_result -> type [i ],
@@ -1099,6 +1120,7 @@ int qat_fips_self_test(void *qatctx, int ondemand, int co_ex_enabled)
10991120 qat_hw_dsa_offload = 0 ;
11001121 qat_hw_dh_offload = 0 ;
11011122 qat_hw_ecx_448_offload = 0 ;
1123+ qat_hw_hkdf_offload = 0 ;
11021124 qat_hw_prf_offload = 0 ;
11031125# ifdef ENABLE_QAT_SW_SHA2
11041126 qat_hw_sha_offload = 0 ;
@@ -1146,6 +1168,9 @@ int qat_fips_self_test(void *qatctx, int ondemand, int co_ex_enabled)
11461168# ifdef ENABLE_QAT_HW_ECX
11471169 qat_hw_ecx_448_offload = 1 ;
11481170# endif
1171+ # ifdef ENABLE_QAT_HW_HKDF
1172+ qat_hw_hkdf_offload = 1 ;
1173+ # endif
11491174# ifdef ENABLE_QAT_HW_PRF
11501175 qat_hw_prf_offload = 1 ;
11511176# endif
0 commit comments