Lines Matching refs:kctx

26     EVP_KDF_CTX *kctx = EVP_KDF_CTX_new(kdf);  in get_kdfbyname_libctx()  local
29 return kctx; in get_kdfbyname_libctx()
62 EVP_KDF_CTX *kctx = NULL; in test_kdf_tls1_prf() local
73 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf()
74 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0) in test_kdf_tls1_prf()
77 EVP_KDF_CTX_free(kctx); in test_kdf_tls1_prf()
85 EVP_KDF_CTX *kctx = NULL; in test_kdf_tls1_prf_invalid_digest() local
91 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf_invalid_digest()
92 && TEST_false(EVP_KDF_CTX_set_params(kctx, params)); in test_kdf_tls1_prf_invalid_digest()
94 EVP_KDF_CTX_free(kctx); in test_kdf_tls1_prf_invalid_digest()
102 EVP_KDF_CTX *kctx = NULL; in test_kdf_tls1_prf_zero_output_size() local
110 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf_zero_output_size()
111 && TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_tls1_prf_zero_output_size()
112 && TEST_int_eq(EVP_KDF_derive(kctx, out, 0, NULL), 0); in test_kdf_tls1_prf_zero_output_size()
114 EVP_KDF_CTX_free(kctx); in test_kdf_tls1_prf_zero_output_size()
122 EVP_KDF_CTX *kctx = NULL; in test_kdf_tls1_prf_empty_secret() local
129 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf_empty_secret()
130 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0); in test_kdf_tls1_prf_empty_secret()
132 EVP_KDF_CTX_free(kctx); in test_kdf_tls1_prf_empty_secret()
140 EVP_KDF_CTX *kctx = NULL; in test_kdf_tls1_prf_1byte_secret() local
147 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf_1byte_secret()
148 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0); in test_kdf_tls1_prf_1byte_secret()
150 EVP_KDF_CTX_free(kctx); in test_kdf_tls1_prf_1byte_secret()
158 EVP_KDF_CTX *kctx = NULL; in test_kdf_tls1_prf_empty_seed() local
166 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf_empty_seed()
167 && TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_tls1_prf_empty_seed()
168 && TEST_int_eq(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0); in test_kdf_tls1_prf_empty_seed()
170 EVP_KDF_CTX_free(kctx); in test_kdf_tls1_prf_empty_seed()
178 EVP_KDF_CTX *kctx = NULL; in test_kdf_tls1_prf_1byte_seed() local
185 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf_1byte_seed()
186 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0); in test_kdf_tls1_prf_1byte_seed()
188 EVP_KDF_CTX_free(kctx); in test_kdf_tls1_prf_1byte_seed()
223 EVP_KDF_CTX *kctx = NULL; in test_kdf_hkdf() local
233 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF)) in test_kdf_hkdf()
234 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0) in test_kdf_hkdf()
237 EVP_KDF_CTX_free(kctx); in test_kdf_hkdf()
249 EVP_KDF_CTX *kctx = NULL; in do_kdf_hkdf_gettables() local
255 || !TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF)) in do_kdf_hkdf_gettables()
256 || !TEST_true(EVP_KDF_CTX_set_params(kctx, params))) in do_kdf_hkdf_gettables()
260 if (!TEST_ptr(gettables = EVP_KDF_CTX_gettable_params(kctx)) in do_kdf_hkdf_gettables()
268 if (!TEST_int_eq(EVP_KDF_CTX_get_params(kctx, params_get), 1) in do_kdf_hkdf_gettables()
272 if (!TEST_int_eq(EVP_KDF_CTX_get_params(kctx, params_get), 0)) in do_kdf_hkdf_gettables()
278 if (!TEST_int_eq(EVP_KDF_CTX_get_params(kctx, params_get), 1)) in do_kdf_hkdf_gettables()
282 EVP_KDF_CTX_free(kctx); in do_kdf_hkdf_gettables()
305 EVP_KDF_CTX *kctx = NULL; in test_kdf_hkdf_invalid_digest() local
311 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF)) in test_kdf_hkdf_invalid_digest()
312 && TEST_false(EVP_KDF_CTX_set_params(kctx, params)); in test_kdf_hkdf_invalid_digest()
314 EVP_KDF_CTX_free(kctx); in test_kdf_hkdf_invalid_digest()
322 EVP_KDF_CTX *kctx = NULL; in test_kdf_hkdf_derive_set_params_fail() local
326 if (!TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF))) in test_kdf_hkdf_derive_set_params_fail()
334 if (!TEST_int_eq(EVP_KDF_derive(kctx, out, sizeof(out), params), 0)) in test_kdf_hkdf_derive_set_params_fail()
338 EVP_KDF_CTX_free(kctx); in test_kdf_hkdf_derive_set_params_fail()
345 EVP_KDF_CTX *kctx = NULL; in test_kdf_hkdf_set_invalid_mode() local
348 if (!TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF))) in test_kdf_hkdf_set_invalid_mode()
353 if (!TEST_int_eq(EVP_KDF_CTX_set_params(kctx, params), 0)) in test_kdf_hkdf_set_invalid_mode()
357 if (!TEST_int_eq(EVP_KDF_CTX_set_params(kctx, params), 0)) in test_kdf_hkdf_set_invalid_mode()
362 EVP_KDF_CTX_free(kctx); in test_kdf_hkdf_set_invalid_mode()
369 EVP_KDF_CTX *kctx = NULL; in do_kdf_hkdf_set_invalid_param() local
373 if (!TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF))) in do_kdf_hkdf_set_invalid_param()
381 if (!TEST_int_eq(EVP_KDF_CTX_set_params(kctx, params), 0)) in do_kdf_hkdf_set_invalid_param()
386 EVP_KDF_CTX_free(kctx); in do_kdf_hkdf_set_invalid_param()
405 EVP_KDF_CTX *kctx = NULL; in test_kdf_hkdf_zero_output_size() local
413 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF)) in test_kdf_hkdf_zero_output_size()
414 && TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_hkdf_zero_output_size()
415 && TEST_int_eq(EVP_KDF_derive(kctx, out, 0, NULL), 0); in test_kdf_hkdf_zero_output_size()
417 EVP_KDF_CTX_free(kctx); in test_kdf_hkdf_zero_output_size()
425 EVP_KDF_CTX *kctx = NULL; in test_kdf_hkdf_empty_key() local
432 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF)) in test_kdf_hkdf_empty_key()
433 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0); in test_kdf_hkdf_empty_key()
435 EVP_KDF_CTX_free(kctx); in test_kdf_hkdf_empty_key()
443 EVP_KDF_CTX *kctx = NULL; in test_kdf_hkdf_1byte_key() local
450 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF)) in test_kdf_hkdf_1byte_key()
451 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0); in test_kdf_hkdf_1byte_key()
453 EVP_KDF_CTX_free(kctx); in test_kdf_hkdf_1byte_key()
461 EVP_KDF_CTX *kctx = NULL; in test_kdf_hkdf_empty_salt() local
468 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HKDF)) in test_kdf_hkdf_empty_salt()
469 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0); in test_kdf_hkdf_empty_salt()
471 EVP_KDF_CTX_free(kctx); in test_kdf_hkdf_empty_salt()
500 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf1() local
531 || !TEST_ptr(kctx = get_kdfbyname_libctx(libctx, OSSL_KDF_NAME_PBKDF1)) in test_kdf_pbkdf1()
532 || !TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_pbkdf1()
533 || !TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0) in test_kdf_pbkdf1()
539 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf1()
550 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf1_key_too_long() local
581 || !TEST_ptr(kctx = get_kdfbyname_libctx(libctx, OSSL_KDF_NAME_PBKDF1)) in test_kdf_pbkdf1_key_too_long()
582 || !TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_pbkdf1_key_too_long()
583 || !TEST_int_eq(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0)) in test_kdf_pbkdf1_key_too_long()
588 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf1_key_too_long()
621 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf2() local
638 || !TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_PBKDF2)) in test_kdf_pbkdf2()
639 || !TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0) in test_kdf_pbkdf2()
645 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf2()
653 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf2_small_output() local
664 || !TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_PBKDF2)) in test_kdf_pbkdf2_small_output()
665 || !TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_pbkdf2_small_output()
667 || !TEST_int_eq(EVP_KDF_derive(kctx, out, 112 / 8 - 1, NULL), 0)) in test_kdf_pbkdf2_small_output()
672 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf2_small_output()
680 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf2_large_output() local
695 || !TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_PBKDF2)) in test_kdf_pbkdf2_large_output()
697 || !TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_pbkdf2_large_output()
698 || (len != 0 && !TEST_int_eq(EVP_KDF_derive(kctx, out, len, NULL), 0))) in test_kdf_pbkdf2_large_output()
703 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf2_large_output()
711 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf2_small_salt() local
721 || !TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_PBKDF2)) in test_kdf_pbkdf2_small_salt()
723 || !TEST_false(EVP_KDF_CTX_set_params(kctx, params))) in test_kdf_pbkdf2_small_salt()
728 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf2_small_salt()
736 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf2_small_iterations() local
746 || !TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_PBKDF2)) in test_kdf_pbkdf2_small_iterations()
748 || !TEST_false(EVP_KDF_CTX_set_params(kctx, params))) in test_kdf_pbkdf2_small_iterations()
753 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf2_small_iterations()
761 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf2_small_salt_pkcs5() local
773 || !TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_PBKDF2)) in test_kdf_pbkdf2_small_salt_pkcs5()
775 || !TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_pbkdf2_small_salt_pkcs5()
776 || !TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0)) in test_kdf_pbkdf2_small_salt_pkcs5()
784 if (!TEST_true(EVP_KDF_CTX_set_params(kctx, mode_params)) in test_kdf_pbkdf2_small_salt_pkcs5()
785 || !TEST_int_eq(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0)) in test_kdf_pbkdf2_small_salt_pkcs5()
790 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf2_small_salt_pkcs5()
798 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf2_small_iterations_pkcs5() local
810 || !TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_PBKDF2)) in test_kdf_pbkdf2_small_iterations_pkcs5()
812 || !TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_pbkdf2_small_iterations_pkcs5()
813 || !TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0)) in test_kdf_pbkdf2_small_iterations_pkcs5()
821 if (!TEST_true(EVP_KDF_CTX_set_params(kctx, mode_params)) in test_kdf_pbkdf2_small_iterations_pkcs5()
822 || !TEST_int_eq(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0)) in test_kdf_pbkdf2_small_iterations_pkcs5()
827 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf2_small_iterations_pkcs5()
835 EVP_KDF_CTX *kctx = NULL; in test_kdf_pbkdf2_invalid_digest() local
845 || !TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_PBKDF2)) in test_kdf_pbkdf2_invalid_digest()
847 || !TEST_false(EVP_KDF_CTX_set_params(kctx, params))) in test_kdf_pbkdf2_invalid_digest()
852 EVP_KDF_CTX_free(kctx); in test_kdf_pbkdf2_invalid_digest()
861 EVP_KDF_CTX *kctx; in test_kdf_scrypt() local
887 TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SCRYPT)) in test_kdf_scrypt()
888 && TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_scrypt()
892 && TEST_true(EVP_KDF_CTX_set_params(kctx, p - 1)) in test_kdf_scrypt()
893 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0) in test_kdf_scrypt()
896 EVP_KDF_CTX_free(kctx); in test_kdf_scrypt()
904 EVP_KDF_CTX *kctx; in test_kdf_ss_hash() local
931 TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SSKDF)) in test_kdf_ss_hash()
932 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0) in test_kdf_ss_hash()
935 EVP_KDF_CTX_free(kctx); in test_kdf_ss_hash()
942 EVP_KDF_CTX *kctx; in test_kdf_x963() local
984 TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_X963KDF)) in test_kdf_x963()
985 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0) in test_kdf_x963()
988 EVP_KDF_CTX_free(kctx); in test_kdf_x963()
1000 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_6803_128() local
1038 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_6803_128()
1039 ret = TEST_ptr(kctx) in test_kdf_kbkdf_6803_128()
1040 && TEST_int_gt(EVP_KDF_derive(kctx, result, sizeof(result), in test_kdf_kbkdf_6803_128()
1044 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_6803_128()
1055 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_6803_256() local
1104 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_6803_256()
1105 ret = TEST_ptr(kctx) in test_kdf_kbkdf_6803_256()
1106 && TEST_int_gt(EVP_KDF_derive(kctx, result, sizeof(result), in test_kdf_kbkdf_6803_256()
1110 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_6803_256()
1150 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_invalid_digest() local
1161 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_invalid_digest()
1162 ret = TEST_ptr(kctx) in test_kdf_kbkdf_invalid_digest()
1163 && TEST_false(EVP_KDF_CTX_set_params(kctx, params)); in test_kdf_kbkdf_invalid_digest()
1165 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_invalid_digest()
1173 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_invalid_mac() local
1184 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_invalid_mac()
1185 ret = TEST_ptr(kctx) in test_kdf_kbkdf_invalid_mac()
1186 && TEST_false(EVP_KDF_CTX_set_params(kctx, params)); in test_kdf_kbkdf_invalid_mac()
1188 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_invalid_mac()
1196 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_invalid_r() local
1207 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_invalid_r()
1208 ret = TEST_ptr(kctx) in test_kdf_kbkdf_invalid_r()
1209 && TEST_false(EVP_KDF_CTX_set_params(kctx, params)); in test_kdf_kbkdf_invalid_r()
1211 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_invalid_r()
1220 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_empty_key() local
1232 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_empty_key()
1233 ret = TEST_ptr(kctx) in test_kdf_kbkdf_empty_key()
1234 && TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_kbkdf_empty_key()
1235 && TEST_int_eq(EVP_KDF_derive(kctx, result, sizeof(result), NULL), 0); in test_kdf_kbkdf_empty_key()
1237 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_empty_key()
1245 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_1byte_key() local
1256 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_1byte_key()
1257 ret = TEST_ptr(kctx) in test_kdf_kbkdf_1byte_key()
1258 && TEST_int_gt(EVP_KDF_derive(kctx, result, sizeof(result), params), 0); in test_kdf_kbkdf_1byte_key()
1260 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_1byte_key()
1268 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_zero_output_size() local
1280 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_zero_output_size()
1281 ret = TEST_ptr(kctx) in test_kdf_kbkdf_zero_output_size()
1282 && TEST_true(EVP_KDF_CTX_set_params(kctx, params)) in test_kdf_kbkdf_zero_output_size()
1283 && TEST_int_eq(EVP_KDF_derive(kctx, result, 0, NULL), 0); in test_kdf_kbkdf_zero_output_size()
1285 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_zero_output_size()
1295 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_8009_prf1() local
1323 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_8009_prf1()
1324 ret = TEST_ptr(kctx) in test_kdf_kbkdf_8009_prf1()
1325 && TEST_int_gt(EVP_KDF_derive(kctx, result, sizeof(result), params), 0) in test_kdf_kbkdf_8009_prf1()
1328 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_8009_prf1()
1335 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_8009_prf2() local
1367 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_8009_prf2()
1368 ret = TEST_ptr(kctx) in test_kdf_kbkdf_8009_prf2()
1369 && TEST_int_gt(EVP_KDF_derive(kctx, result, sizeof(result), params), 0) in test_kdf_kbkdf_8009_prf2()
1372 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_8009_prf2()
1385 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_fixedinfo() local
1426 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_fixedinfo()
1427 ret = TEST_ptr(kctx) in test_kdf_kbkdf_fixedinfo()
1428 && TEST_int_gt(EVP_KDF_derive(kctx, result, sizeof(result), params), 0) in test_kdf_kbkdf_fixedinfo()
1431 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_fixedinfo()
1439 EVP_KDF_CTX *kctx; in test_kdf_kbkdf_kmac() local
1578 kctx = get_kdfbyname("KBKDF"); in test_kdf_kbkdf_kmac()
1579 ret = TEST_ptr(kctx) in test_kdf_kbkdf_kmac()
1580 && TEST_size_t_eq(EVP_KDF_CTX_get_kdf_size(kctx), SIZE_MAX) in test_kdf_kbkdf_kmac()
1581 && TEST_int_gt(EVP_KDF_derive(kctx, result, sizeof(result), params), 0) in test_kdf_kbkdf_kmac()
1584 EVP_KDF_CTX_free(kctx); in test_kdf_kbkdf_kmac()
1591 EVP_KDF_CTX *kctx; in test_kdf_ss_hmac() local
1621 TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SSKDF)) in test_kdf_ss_hmac()
1622 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0) in test_kdf_ss_hmac()
1625 EVP_KDF_CTX_free(kctx); in test_kdf_ss_hmac()
1632 EVP_KDF_CTX *kctx; in test_kdf_ss_kmac() local
1668 TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SSKDF)) in test_kdf_ss_kmac()
1669 && TEST_size_t_eq(EVP_KDF_CTX_get_kdf_size(kctx), 0) in test_kdf_ss_kmac()
1670 && TEST_int_eq(EVP_KDF_CTX_set_params(kctx, params), 1) in test_kdf_ss_kmac()
1673 || TEST_size_t_eq(EVP_KDF_CTX_get_kdf_size(kctx), SIZE_MAX)) in test_kdf_ss_kmac()
1674 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0) in test_kdf_ss_kmac()
1677 EVP_KDF_CTX_free(kctx); in test_kdf_ss_kmac()
1684 EVP_KDF_CTX *kctx; in test_kdf_sshkdf() local
1730 TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_SSHKDF)) in test_kdf_sshkdf()
1731 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0) in test_kdf_sshkdf()
1734 EVP_KDF_CTX_free(kctx); in test_kdf_sshkdf()
1793 EVP_KDF_CTX *kctx = NULL; in test_kdf_x942_asn1() local
1817 TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_X942KDF_ASN1)) in test_kdf_x942_asn1()
1818 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0) in test_kdf_x942_asn1()
1821 EVP_KDF_CTX_free(kctx); in test_kdf_x942_asn1()
1829 EVP_KDF_CTX *kctx; in test_kdf_krb5kdf() local
1853 TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_KRB5KDF)) in test_kdf_krb5kdf()
1854 && TEST_int_gt(EVP_KDF_derive(kctx, out, sizeof(out), params), 0) in test_kdf_krb5kdf()
1857 EVP_KDF_CTX_free(kctx); in test_kdf_krb5kdf()
1864 EVP_KDF_CTX *kctx = NULL; in test_kdf_hmac_drbg_settables() local
1874 if (!TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HMACDRBGKDF)) in test_kdf_hmac_drbg_settables()
1875 || !TEST_ptr(settableparams = EVP_KDF_CTX_settable_params(kctx))) in test_kdf_hmac_drbg_settables()
1879 if (!TEST_int_le(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 0)) in test_kdf_hmac_drbg_settables()
1890 if (!TEST_int_le(EVP_KDF_CTX_set_params(kctx, params), 0)) in test_kdf_hmac_drbg_settables()
1904 if (!TEST_int_eq(EVP_KDF_CTX_set_params(kctx, params), 1)) in test_kdf_hmac_drbg_settables()
1906 if (!TEST_int_eq(EVP_KDF_CTX_set_params(kctx, params), 1)) in test_kdf_hmac_drbg_settables()
1914 if (!TEST_int_eq(EVP_KDF_CTX_get_params(kctx, params), 1) in test_kdf_hmac_drbg_settables()
1920 if (!TEST_int_eq(EVP_KDF_derive(kctx, out, sizeof(out), NULL), 1)) in test_kdf_hmac_drbg_settables()
1927 if (!TEST_int_le(EVP_KDF_CTX_set_params(kctx, params), 0)) in test_kdf_hmac_drbg_settables()
1933 EVP_KDF_CTX_free(kctx); in test_kdf_hmac_drbg_settables()
1940 EVP_KDF_CTX *kctx = NULL; in test_kdf_hmac_drbg_gettables() local
1946 if (!TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_HMACDRBGKDF)) in test_kdf_hmac_drbg_gettables()
1947 || !TEST_ptr(gettableparams = EVP_KDF_CTX_gettable_params(kctx))) in test_kdf_hmac_drbg_gettables()
1953 if (!TEST_int_le(EVP_KDF_CTX_get_params(kctx, params), 0)) in test_kdf_hmac_drbg_gettables()
1960 if (!TEST_int_le(EVP_KDF_CTX_get_params(kctx, params), 0)) in test_kdf_hmac_drbg_gettables()
1965 EVP_KDF_CTX_free(kctx); in test_kdf_hmac_drbg_gettables()
1973 EVP_KDF_CTX *kctx = NULL; in test_kbkdf_mac_change() local
2002 if (!TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_KBKDF)) in test_kbkdf_mac_change()
2003 || !TEST_true(EVP_KDF_CTX_set_params(kctx, params))) in test_kbkdf_mac_change()
2017 if (!TEST_true(EVP_KDF_derive(kctx, out, sizeof(out), params)) in test_kbkdf_mac_change()
2023 EVP_KDF_CTX_free(kctx); in test_kbkdf_mac_change()