Home
last modified time | relevance | path

Searched refs:libctx (Results 1 – 25 of 67) sorted by relevance

123

/test/
A Dprovider_test.c144 OSSL_LIB_CTX_free(*libctx); in test_provider()
145 *libctx = NULL; in test_provider()
156 OSSL_LIB_CTX_free(*libctx); in test_provider()
157 *libctx = NULL; in test_provider()
203 *libctx = NULL; in test_provider_ex()
213 *libctx = NULL; in test_provider_ex()
225 TEST_ptr(libctx) in test_builtin_provider()
230 OSSL_LIB_CTX_free(libctx); in test_builtin_provider()
243 if (!TEST_ptr(libctx)) in test_builtin_provider_with_child()
275 if (!TEST_ptr(libctx)) in test_loaded_provider()
[all …]
A Dhandshake-memfail.c92 OSSL_LIB_CTX *libctx; in test_record_alloc_counts() local
94 libctx = OSSL_LIB_CTX_new(); in test_record_alloc_counts()
95 if (!TEST_ptr(libctx)) in test_record_alloc_counts()
98 ret = do_handshake(libctx); in test_record_alloc_counts()
100 OSSL_LIB_CTX_free(libctx); in test_record_alloc_counts()
101 libctx = NULL; in test_record_alloc_counts()
119 OSSL_LIB_CTX *libctx; in test_alloc_failures() local
122 if (!TEST_ptr(libctx)) in test_alloc_failures()
125 do_handshake(libctx); in test_alloc_failures()
127 OSSL_LIB_CTX_free(libctx); in test_alloc_failures()
[all …]
A Dprovider_pkey_test.c21 static OSSL_LIB_CTX *libctx = NULL; variable
60 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_pkey_sig()
63 if (!TEST_ptr(deflt = OSSL_PROVIDER_load(libctx, "default"))) in test_pkey_sig()
153 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_alternative_keygen_init()
191 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_pkey_eq()
258 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_pkey_store()
308 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_pkey_delete()
390 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_pkey_store_open_ex()
715 libctx = OSSL_LIB_CTX_new(); in setup_tests()
716 if (libctx == NULL) in setup_tests()
[all …]
A Dpairwise_fail_test.c29 static OSSL_LIB_CTX *libctx = NULL; variable
74 if (!TEST_ptr(prov = OSSL_PROVIDER_load(libctx, "fips"))) in setup_selftest_pairwise_failure()
79 OSSL_SELF_TEST_set_callback(libctx, self_test_on_pairwise_fail, &self_test_args); in setup_selftest_pairwise_failure()
106 if (!TEST_ptr_null(pkey = EVP_PKEY_Q_keygen(libctx, NULL, "EC", "P-256"))) in test_keygen_pairwise_failure()
117 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pParams, NULL))) in test_keygen_pairwise_failure()
128 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "ED25519", NULL))) in test_keygen_pairwise_failure()
139 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "ML-DSA-87", NULL))) in test_keygen_pairwise_failure()
203 libctx = OSSL_LIB_CTX_new(); in setup_tests()
204 if (libctx == NULL) in setup_tests()
206 if (!OSSL_LIB_CTX_load_config(libctx, config_file)) { in setup_tests()
[all …]
A Duser_property_test.c88 OSSL_LIB_CTX *libctx; in test_default_props_and_providers() local
93 if (!TEST_ptr(libctx = OSSL_LIB_CTX_new()) in test_default_props_and_providers()
94 || !TEST_true(OSSL_PROVIDER_add_builtin(libctx, "testprov", in test_default_props_and_providers()
99 && !TEST_true(EVP_set_default_properties(libctx, MYPROPERTIES))) in test_default_props_and_providers()
102 if (!TEST_ptr(testprov = OSSL_PROVIDER_load(libctx, "testprov"))) in test_default_props_and_providers()
106 && !TEST_true(EVP_set_default_properties(libctx, MYPROPERTIES))) in test_default_props_and_providers()
109 if (!TEST_ptr(testprovmd = EVP_MD_fetch(libctx, "testprovmd", NULL))) in test_default_props_and_providers()
113 if (!TEST_true(EVP_set_default_properties(libctx, MYPROPERTIES))) in test_default_props_and_providers()
116 if (!TEST_ptr(testprovmd = EVP_MD_fetch(libctx, "testprovmd", NULL))) in test_default_props_and_providers()
124 OSSL_LIB_CTX_free(libctx); in test_default_props_and_providers()
A Dprovfetchtest.c206 OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new_child(handle, in); in dummy_provider_init() local
209 *provctx = (void *)libctx; in dummy_provider_init()
216 if (RAND_bytes_ex(libctx, buf, sizeof(buf), 0) <= 0) in dummy_provider_init()
232 OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new(); in fetch_test() local
242 if (!TEST_ptr(libctx)) in fetch_test()
245 if (!TEST_true(OSSL_PROVIDER_add_builtin(libctx, "dummy-prov", in fetch_test()
253 decoder = OSSL_DECODER_fetch(libctx, "DUMMY", in fetch_test()
259 encoder = OSSL_ENCODER_fetch(libctx, "DUMMY", in fetch_test()
265 loader = OSSL_STORE_LOADER_fetch(libctx, "DUMMY", in fetch_test()
271 if (!TEST_true(RAND_set_DRBG_type(libctx, "DUMMY", in fetch_test()
[all …]
A Dprovider_status_test.c32 static OSSL_LIB_CTX *libctx = NULL; variable
154 if (!TEST_ptr(prov = OSSL_PROVIDER_load(libctx, provider_name))) in test_provider_status()
165 if (!TEST_ptr(fetch = EVP_MD_fetch(libctx, "SHA256", NULL))) in test_provider_status()
170 if (!TEST_ptr((pctx = EVP_PKEY_CTX_new_from_name(libctx, "RSA", NULL))) in test_provider_status()
182 OSSL_SELF_TEST_set_callback(libctx, self_test_on_demand, &self_test_args); in test_provider_status()
194 if (!TEST_ptr_null(fetch = EVP_MD_fetch(libctx, "SHA256", NULL))) in test_provider_status()
209 if (!TEST_ptr(prov = OSSL_PROVIDER_load(libctx, provider_name))) in test_provider_gettable_params()
237 libctx = OSSL_LIB_CTX_new(); in setup_tests()
238 if (libctx == NULL) in setup_tests()
244 if (!OSSL_LIB_CTX_load_config(libctx, config_file)) { in setup_tests()
[all …]
A Devp_skey_test.c18 static OSSL_LIB_CTX *libctx = NULL; variable
49 if (!TEST_ptr(fake_prov = fake_cipher_start(libctx))) in test_skey_cipher()
63 key = EVP_SKEY_import(libctx, "fake_cipher", FAKE_CIPHER_FETCH_PROPS, in test_skey_cipher()
111 deflprov = OSSL_PROVIDER_load(libctx, "default"); in test_skey_skeymgmt()
131 if (!TEST_ptr(key = EVP_SKEY_import(libctx, in test_skey_skeymgmt()
178 deflprov = OSSL_PROVIDER_load(libctx, "default"); in test_aes_raw_skey()
188 aes_cbc = EVP_CIPHER_fetch(libctx, "AES-128-CBC", "provider=default"); in test_aes_raw_skey()
254 deflprov = OSSL_PROVIDER_load(libctx, "default"); in test_des_raw_skey()
310 libctx = OSSL_LIB_CTX_new(); in setup_tests()
311 if (libctx == NULL) in setup_tests()
[all …]
A Dp_test.c43 OSSL_LIB_CTX *libctx; member
152 EVP_MD *md4 = EVP_MD_fetch(ctx->libctx, "MD4", NULL); in p_get_params()
162 deflt = OSSL_PROVIDER_load(ctx->libctx, "default"); in p_get_params()
178 && OSSL_PROVIDER_available(ctx->libctx, "default") in p_get_params()
179 && OSSL_PROVIDER_available(ctx->libctx, "base") in p_get_params()
180 && OSSL_PROVIDER_available(ctx->libctx, "legacy") in p_get_params()
181 && OSSL_PROVIDER_available(ctx->libctx, "p_test") in p_get_params()
303 ctx->libctx = OSSL_LIB_CTX_new_child(handle, oin); in OSSL_provider_init()
304 if (ctx->libctx == NULL) { in OSSL_provider_init()
316 EVP_MD *sha256 = EVP_MD_fetch(ctx->libctx, "SHA2-256", NULL); in OSSL_provider_init()
[all …]
A Ddecoder_propq_test.c14 static OSSL_LIB_CTX *libctx = NULL; variable
58 EVP_default_properties_enable_fips(libctx, 1); in test_decode_nonfipsalg()
67 if (!TEST_ptr_null(PEM_read_bio_PrivateKey_ex(bio, &privkey, &passcb, NULL, libctx, NULL))) in test_decode_nonfipsalg()
74 …if (!TEST_ptr_null(PEM_read_bio_PrivateKey_ex(bio, &privkey, &passcb, NULL, libctx, "?fips=true"))) in test_decode_nonfipsalg()
107 if (!test_get_libctx(&libctx, &nullprov, config_file, &libprov, prov_name)) in setup_tests()
117 OSSL_LIB_CTX_free(libctx); in cleanup_tests()
A Dlms_test.c25 static OSSL_LIB_CTX *libctx = NULL; variable
40 ret = TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "LMS", propq)) in lms_pubkey_from_data()
99 libctx, NULL))) in lms_pubkey_decoder_fail_test()
137 libctx, NULL))) in key_decode_from_bio()
184 libctx, NULL))) in lms_pubkey_decoder_test()
247 if (!TEST_ptr(vctx = EVP_PKEY_CTX_new_from_pkey(libctx, key, NULL))) in lms_key_validate_test()
265 && TEST_ptr(sig = EVP_SIGNATURE_fetch(libctx, "LMS", NULL)) in lms_verify_test()
329 && TEST_ptr(sig = EVP_SIGNATURE_fetch(libctx, "LMS", NULL)) in lms_message_signing_fail_test()
408 || !TEST_ptr(sig = EVP_SIGNATURE_fetch(libctx, "LMS", NULL)) in lms_verify_bad_sig_test()
503 if (!TEST_ptr(sig = EVP_SIGNATURE_fetch(libctx, "LMS", NULL))) in lms_verify_bad_pub_sig_test()
[all …]
A Dcmp_vfy_test.c40 static OSSL_LIB_CTX *libctx = NULL; variable
102 if ((fixture->msg = load_pkimsg(ir_protected_f, libctx)) == NULL) in execute_verify_popo_test()
264 if (!TEST_ptr(fixture->msg = load_pkimsg(ir_protected_f, libctx)) in test_validate_msg_signature_srvcert()
352 load_pkimsg(ir_protected_0_extracerts, libctx))) { in test_validate_msg_signature_sender_cert_absent()
366 if (!TEST_ptr(fixture->msg = load_pkimsg(ir_protected_f, libctx)) in test_validate_with_sender()
591 OSSL_LIB_CTX_free(libctx); in cleanup_tests()
645 if (!TEST_ptr(endentity1 = load_cert_pem(endentity1_f, libctx)) in OPT_TEST_DECLARE_USAGE()
651 if (!TEST_ptr(insta_cert = load_cert_pem(instacert_f, libctx)) in OPT_TEST_DECLARE_USAGE()
656 if (!TEST_ptr(srvcert = load_cert_pem(server_f, libctx)) in OPT_TEST_DECLARE_USAGE()
657 || !TEST_ptr(clcert = load_cert_pem(client_f, libctx))) in OPT_TEST_DECLARE_USAGE()
[all …]
A Dasynctest.c50 OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new(); in change_deflt_libctx() local
54 if (libctx == NULL) in change_deflt_libctx()
57 oldctx = OSSL_LIB_CTX_set0_default(libctx); in change_deflt_libctx()
62 if (tmpctx != libctx) in change_deflt_libctx()
66 oldctx = OSSL_LIB_CTX_set0_default(libctx); in change_deflt_libctx()
71 if (tmpctx != libctx) in change_deflt_libctx()
76 OSSL_LIB_CTX_free(libctx); in change_deflt_libctx()
353 if (libctx == NULL) { in test_ASYNC_start_job_ex()
373 if (tmpctx != libctx) { in test_ASYNC_start_job_ex()
388 if (tmpctx != libctx) { in test_ASYNC_start_job_ex()
[all …]
A Dcmp_protect_test.c36 static OSSL_LIB_CTX *libctx = NULL; variable
61 if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(libctx, NULL))) { in set_up()
137 if (!TEST_ptr(fixture->msg = load_pkimsg(ir_unprotected_f, libctx)) in test_cmp_calc_protection_no_key_no_secret()
345 fixture->with_ss, ctx->libctx, ctx->propq); in execute_cmp_build_cert_chain_test()
542 OSSL_LIB_CTX_free(libctx); in cleanup_tests()
587 if (!TEST_ptr(server_key = load_pkey_pem(server_key_f, libctx)) in OPT_TEST_DECLARE_USAGE()
591 if (!TEST_ptr(prot_RSA_key = load_pkey_pem(prot_RSA_f, libctx))) in OPT_TEST_DECLARE_USAGE()
594 if (!TEST_ptr(prot_Ed_key = load_pkey_pem(prot_Ed_f, libctx))) in OPT_TEST_DECLARE_USAGE()
597 if (!TEST_ptr(ir_protected = load_pkimsg(ir_protected_f, libctx)) in OPT_TEST_DECLARE_USAGE()
603 if (!TEST_ptr(endentity1 = load_cert_pem(endentity1_f, libctx)) in OPT_TEST_DECLARE_USAGE()
[all …]
A Drsa_x931_test.c18 static OSSL_LIB_CTX *libctx = NULL; variable
26 ret = TEST_ptr(rsa = ossl_rsa_new_with_ctx(libctx)) in test_rsa_x931_keygen()
37 if (!test_get_libctx(&libctx, &prov_null, NULL, NULL, NULL)) in setup_tests()
47 OSSL_LIB_CTX_free(libctx); in cleanup_tests()
A Dfips_version_test.c14 static OSSL_LIB_CTX *libctx = NULL; variable
41 return TEST_int_eq(fips_provider_version_match(libctx, version), 1); in test_fips_version()
63 if (!test_get_libctx(&libctx, NULL, config_file, &libprov, NULL)) in setup_tests()
77 OSSL_LIB_CTX_free(libctx); in cleanup_tests()
A Dcmp_server_test.c21 static OSSL_LIB_CTX *libctx = NULL; variable
38 if (!TEST_ptr(fixture->srv_ctx = OSSL_CMP_SRV_CTX_new(libctx, NULL))) in set_up()
72 if (!TEST_ptr(client_ctx = OSSL_CMP_CTX_new(libctx, NULL)) in execute_test_handle_request()
127 OSSL_LIB_CTX_free(libctx); in cleanup_tests()
149 if (!test_arg_libctx(&libctx, &default_null_provider, &provider, 1, USAGE)) in OPT_TEST_DECLARE_USAGE()
152 if (!TEST_ptr(request = load_pkimsg(request_f, libctx))) { in OPT_TEST_DECLARE_USAGE()
A Devp_libctx_test.c38 static OSSL_LIB_CTX *libctx = NULL; variable
336 || !TEST_ptr(cert = X509_new_ex(libctx, NULL)) in dhx_cert_load()
385 if (!TEST_ptr(cipher = EVP_CIPHER_fetch(libctx, name, NULL))) in test_cipher_reinit()
479 if (!TEST_ptr(cipher = EVP_CIPHER_fetch(libctx, name, NULL))) in test_cipher_reinit_partialupdate()
537 if (OSSL_PROVIDER_available(libctx, "fips") in collect_cipher_names()
610 if (fips_provider_version_match(libctx, ">=3.4.0")) { in kem_rsa_gen_recover()
748 if (!TEST_ptr(gctx = EVP_PKEY_CTX_new_from_name(libctx, "DH", NULL)) in gen_dh_key()
768 if (!TEST_ptr(sctx = EVP_PKEY_CTX_new_from_pkey(libctx, key, NULL))) in kem_invalid_keytype()
811 is_fips_lt_3_5 = is_fips && fips_provider_version_lt(libctx, 3, 5, 0); in setup_tests()
814 if (!is_fips || fips_provider_version_lt(libctx, 3, 4, 0)) in setup_tests()
[all …]
A Dssl_test.c24 static OSSL_LIB_CTX *libctx = NULL; variable
405 test_ctx = SSL_TEST_CTX_create(conf, test_app, libctx); in test_handshake()
418 server_ctx = SSL_CTX_new_ex(libctx, NULL, DTLS_server_method()); in test_handshake()
435 resume_server_ctx = SSL_CTX_new_ex(libctx, NULL, in test_handshake()
441 resume_client_ctx = SSL_CTX_new_ex(libctx, NULL, in test_handshake()
461 server_ctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()); in test_handshake()
478 client_ctx = SSL_CTX_new_ex(libctx, NULL, TLS_client_method()); in test_handshake()
483 resume_server_ctx = SSL_CTX_new_ex(libctx, NULL, in test_handshake()
490 resume_client_ctx = SSL_CTX_new_ex(libctx, NULL, in test_handshake()
568 if (!test_arg_libctx(&libctx, &defctxnull, &thisprov, 1, USAGE)) in OPT_TEST_DECLARE_USAGE()
[all …]
A Devp_pkey_dhkem_test.c29 static OSSL_LIB_CTX *libctx = NULL; variable
132 if (!TEST_ptr(genctx = EVP_PKEY_CTX_new_from_name(libctx, "EC", NULL)) in test_ec_dhkem_derivekey_fail()
251 if (!TEST_ptr(auth = EVP_PKEY_Q_keygen(libctx, NULL, "EC", "P-521"))) in test_ec_auth_key_curve_mismatch()
407 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_pkey(libctx, priv, NULL))) in test_nopublic()
533 if (!TEST_ptr(recip = EVP_PKEY_Q_keygen(libctx, NULL, curve)) in test_ec_noikme()
579 ret = TEST_ptr(key = EVP_PKEY_Q_keygen(libctx, NULL, "EC", curve)) in do_ec_curve_failtest()
761 if (!TEST_ptr(auth = EVP_PKEY_Q_keygen(libctx, NULL, "X448"))) in test_ecx_auth_key_curve_mismatch()
777 ret = TEST_ptr(key = EVP_PKEY_Q_keygen(libctx, NULL, "ED448")) in test_ed_curve_unsupported()
809 EVP_PKEY_CTX_new_from_pkey(libctx, in setup_tests()
814 EVP_PKEY_CTX_new_from_pkey(libctx, in setup_tests()
[all …]
/test/testutil/
A Dprovider.c22 if (libctx != NULL) { in test_get_libctx()
23 if ((new_libctx = *libctx = OSSL_LIB_CTX_new()) == NULL) { in test_get_libctx()
64 return test_get_libctx(libctx, default_null_prov, in test_arg_libctx()
83 if (!OSSL_PROVIDER_available(libctx, "fips")) in fips_provider_version()
86 if ((fips_prov = OSSL_PROVIDER_load(libctx, "fips")) == NULL) in fips_provider_version()
104 if ((res = fips_provider_version(libctx, &prov)) <= 0) in fips_provider_version_eq()
114 if ((res = fips_provider_version(libctx, &prov)) <= 0) in fips_provider_version_ne()
124 if ((res = fips_provider_version(libctx, &prov)) <= 0) in fips_provider_version_le()
137 if ((res = fips_provider_version(libctx, &prov)) <= 0) in fips_provider_version_lt()
150 if ((res = fips_provider_version(libctx, &prov)) <= 0) in fips_provider_version_gt()
[all …]
A Dfake_random.c188 OSSL_PROVIDER *fake_rand_start(OSSL_LIB_CTX *libctx) in fake_rand_start() argument
192 if (!TEST_true(OSSL_PROVIDER_add_builtin(libctx, "fake-rand", in fake_rand_start()
194 || !TEST_true(RAND_set_DRBG_type(libctx, "fake", NULL, NULL, NULL)) in fake_rand_start()
195 || !TEST_ptr(p = OSSL_PROVIDER_try_load(libctx, "fake-rand", 1))) in fake_rand_start()
199 if (!TEST_true(check_rng(RAND_get0_primary(libctx), "primary")) in fake_rand_start()
200 || !TEST_true(check_rng(RAND_get0_private(libctx), "private")) in fake_rand_start()
201 || !TEST_true(check_rng(RAND_get0_public(libctx), "public"))) { in fake_rand_start()
222 void fake_rand_set_public_private_callbacks(OSSL_LIB_CTX *libctx, in fake_rand_set_public_private_callbacks() argument
228 fake_rand_set_callback(RAND_get0_private(libctx), cb); in fake_rand_set_public_private_callbacks()
229 fake_rand_set_callback(RAND_get0_public(libctx), cb); in fake_rand_set_public_private_callbacks()
A Dload.c18 X509 *load_cert_pem(const char *file, OSSL_LIB_CTX *libctx) in load_cert_pem() argument
26 && TEST_ptr(cert = X509_new_ex(libctx, NULL))) in load_cert_pem()
69 EVP_PKEY *load_pkey_pem(const char *file, OSSL_LIB_CTX *libctx) in load_pkey_pem() argument
80 libctx, NULL)) in load_pkey_pem()
92 X509_REQ *load_csr_der(const char *file, OSSL_LIB_CTX *libctx) in load_csr_der() argument
100 csr = X509_REQ_new_ex(libctx, NULL); in load_csr_der()
/test/helpers/
A Dpredefined_dhparams.c21 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_from_name(libctx, type, NULL); in get_dh_from_pg_bn()
63 dhpkey = get_dh_from_pg_bn(libctx, type, p, g, q); in get_dh_from_pg()
72 EVP_PKEY *get_dh512(OSSL_LIB_CTX *libctx) in get_dh512() argument
86 return get_dh_from_pg(libctx, "DH", dh512_p, sizeof(dh512_p), in get_dh512()
90 EVP_PKEY *get_dhx512(OSSL_LIB_CTX *libctx) in get_dhx512() argument
113 return get_dh_from_pg(libctx, "X9.42 DH", in get_dhx512()
119 EVP_PKEY *get_dh1024dsa(OSSL_LIB_CTX *libctx) in get_dh1024dsa() argument
152 EVP_PKEY *get_dh2048(OSSL_LIB_CTX *libctx) in get_dh2048() argument
165 dhpkey = get_dh_from_pg_bn(libctx, "DH", p, g, NULL); in get_dh2048()
173 EVP_PKEY *get_dh4096(OSSL_LIB_CTX *libctx) in get_dh4096() argument
[all …]
A Dpredefined_dhparams.h13 EVP_PKEY *get_dh512(OSSL_LIB_CTX *libctx);
14 EVP_PKEY *get_dhx512(OSSL_LIB_CTX *libctx);
16 EVP_PKEY *get_dh2048(OSSL_LIB_CTX *libctx);
17 EVP_PKEY *get_dh4096(OSSL_LIB_CTX *libctx);

Completed in 40 milliseconds

123