Home
last modified time | relevance | path

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

12345678910>>...27

/freebsd/crypto/openssl/test/
H A Dprovider_test.c37 static int test_provider(OSSL_LIB_CTX **libctx, const char *name, in test_provider() argument
57 EVP_set_default_properties(*libctx, "fips=yes"); in test_provider()
62 if (!TEST_ptr(base = OSSL_PROVIDER_load(*libctx, "base"))) in test_provider()
64 if (!TEST_ptr(prov = OSSL_PROVIDER_load(*libctx, name))) in test_provider()
71 EVP_set_default_properties(*libctx, ""); in test_provider()
84 EVP_set_default_properties(*libctx, "fips=yes"); in test_provider()
88 EVP_set_default_properties(*libctx, ""); in test_provider()
106 /* Legacy provider should also be unloaded from child libctx */ in test_provider()
112 * the child libctx. Loading and unloading the default provider should in test_provider()
116 legacy = OSSL_PROVIDER_load(*libctx, "legac in test_provider()
162 test_provider_ex(OSSL_LIB_CTX ** libctx,const char * name) test_provider_ex() argument
220 OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new(); test_builtin_provider() local
239 OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new(); test_builtin_provider_with_child() local
271 OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new(); test_loaded_provider() local
[all...]
H A Dprovider_pkey_test.c21 static OSSL_LIB_CTX *libctx = NULL; variable
24 /* Fetch SIGNATURE method using a libctx and propq */
59 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_pkey_sig()
62 if (!TEST_ptr(deflt = OSSL_PROVIDER_load(libctx, "default"))) in test_pkey_sig()
66 if (!TEST_true(fetch_sig(libctx, "RSA", "provider=fake-rsa", fake_rsa)) in test_pkey_sig()
67 || !TEST_true(fetch_sig(libctx, "RSA", "?provider=fake-rsa", fake_rsa))) in test_pkey_sig()
71 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "RSA", in test_pkey_sig()
90 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, in test_pkey_sig()
129 if (!TEST_ptr(deflt = OSSL_PROVIDER_load(libctx, "default"))) in test_alternative_keygen_init()
133 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "RS in test_alternative_keygen_init()
[all...]
H A Dpairwise_fail_test.c29 static OSSL_LIB_CTX *libctx = NULL; variable
39 "The configuration file to use for the libctx" }, in test_get_options()
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()
99 if (!TEST_ptr_null(pkey = EVP_PKEY_Q_keygen(libctx, NULL, "RSA", (size_t)2048))) in test_keygen_pairwise_failure()
106 if (!TEST_ptr_null(pkey = EVP_PKEY_Q_keygen(libctx, NULL, "EC", "P-256"))) in test_keygen_pairwise_failure()
115 if (!TEST_ptr(pParams = PEM_read_bio_Parameters_ex(bio, NULL, libctx, NULL))) 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, "M in test_keygen_pairwise_failure()
[all...]
H 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()
213 * Do some work using the child libctx, to make sure this is possible from 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()
247 || !TEST_ptr(nullprov = OSSL_PROVIDER_load(libctx, "default")) in fetch_test()
248 || !TEST_ptr(dummyprov = OSSL_PROVIDER_load(libctx, "dummy-prov"))) in fetch_test()
253 decoder = OSSL_DECODER_fetch(libctx, "DUMM in fetch_test()
[all...]
H 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()
[all...]
/freebsd/crypto/openssl/crypto/evp/
H A Devp_fetch.c28 OSSL_LIB_CTX *libctx; member
52 methdata->tmp_store = ossl_method_store_new(methdata->libctx); in get_tmp_evp_method_store()
67 static OSSL_METHOD_STORE *get_evp_method_store(OSSL_LIB_CTX *libctx) in get_evp_method_store() argument
69 return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX); in get_evp_method_store()
77 && (store = get_evp_method_store(methdata->libctx)) == NULL) in reserve_evp_method_store()
88 && (store = get_evp_method_store(methdata->libctx)) == NULL) in unreserve_evp_method_store()
140 OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx); in get_evp_method_from_store()
155 && (store = get_evp_method_store(methdata->libctx)) == NULL) in get_evp_method_from_store()
187 if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL in put_evp_method_in_store()
194 && (store = get_evp_method_store(methdata->libctx)) in put_evp_method_in_store()
221 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); construct_evp_method() local
390 evp_generic_fetch(OSSL_LIB_CTX * libctx,int operation_id,const char * name,const char * properties,void * (* new_method)(int name_id,const OSSL_ALGORITHM * algodef,OSSL_PROVIDER * prov),int (* up_ref_method)(void *),void (* free_method)(void *)) evp_generic_fetch() argument
436 evp_method_store_cache_flush(OSSL_LIB_CTX * libctx) evp_method_store_cache_flush() argument
447 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); evp_method_store_remove_all_provided() local
455 evp_set_parsed_default_properties(OSSL_LIB_CTX * libctx,OSSL_PROPERTY_LIST * def_prop,int loadconfig,int mirrored) evp_set_parsed_default_properties() argument
509 evp_set_default_properties_int(OSSL_LIB_CTX * libctx,const char * propq,int loadconfig,int mirrored) evp_set_default_properties_int() argument
525 EVP_set_default_properties(OSSL_LIB_CTX * libctx,const char * propq) EVP_set_default_properties() argument
530 evp_default_properties_merge(OSSL_LIB_CTX * libctx,const char * propq,int loadconfig) evp_default_properties_merge() argument
557 evp_default_property_is_enabled(OSSL_LIB_CTX * libctx,const char * prop_name) evp_default_property_is_enabled() argument
565 EVP_default_properties_is_fips_enabled(OSSL_LIB_CTX * libctx) EVP_default_properties_is_fips_enabled() argument
570 evp_default_properties_enable_fips_int(OSSL_LIB_CTX * libctx,int enable,int loadconfig) evp_default_properties_enable_fips_int() argument
578 EVP_default_properties_enable_fips(OSSL_LIB_CTX * libctx,int enable) EVP_default_properties_enable_fips() argument
583 evp_get_global_properties_str(OSSL_LIB_CTX * libctx,int loadconfig) evp_get_global_properties_str() argument
609 EVP_get1_default_properties(OSSL_LIB_CTX * libctx) EVP_get1_default_properties() argument
628 evp_generic_do_all(OSSL_LIB_CTX * libctx,int operation_id,void (* user_fn)(void * method,void * arg),void * user_arg,void * (* new_method)(int name_id,const OSSL_ALGORITHM * algodef,OSSL_PROVIDER * prov),int (* up_ref_method)(void *),void (* free_method)(void *)) evp_generic_do_all() argument
662 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); evp_is_a() local
674 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); evp_names_do_all() local
[all...]
/freebsd/crypto/openssl/test/testutil/
H A Dprovider.c16 int test_get_libctx(OSSL_LIB_CTX **libctx, OSSL_PROVIDER **default_null_prov, in test_get_libctx() argument
22 if (libctx != NULL) { in test_get_libctx()
23 if ((new_libctx = *libctx = OSSL_LIB_CTX_new()) == NULL) { in test_get_libctx()
24 opt_printf_stderr("Failed to create libctx\n"); in test_get_libctx()
31 opt_printf_stderr("Failed to load null provider into default libctx\n"); in test_get_libctx()
53 int test_arg_libctx(OSSL_LIB_CTX **libctx, OSSL_PROVIDER **default_null_prov, in test_arg_libctx() argument
64 return test_get_libctx(libctx, default_null_prov, in test_arg_libctx()
77 static int fips_provider_version(OSSL_LIB_CTX *libctx, FIPS_VERSION *vers) in fips_provider_version() argument
83 if (!OSSL_PROVIDER_available(libctx, "fips")) in fips_provider_version()
86 if ((fips_prov = OSSL_PROVIDER_load(libctx, "fip in fips_provider_version()
99 fips_provider_version_eq(OSSL_LIB_CTX * libctx,int major,int minor,int patch) fips_provider_version_eq() argument
109 fips_provider_version_ne(OSSL_LIB_CTX * libctx,int major,int minor,int patch) fips_provider_version_ne() argument
119 fips_provider_version_le(OSSL_LIB_CTX * libctx,int major,int minor,int patch) fips_provider_version_le() argument
132 fips_provider_version_lt(OSSL_LIB_CTX * libctx,int major,int minor,int patch) fips_provider_version_lt() argument
145 fips_provider_version_gt(OSSL_LIB_CTX * libctx,int major,int minor,int patch) fips_provider_version_gt() argument
158 fips_provider_version_ge(OSSL_LIB_CTX * libctx,int major,int minor,int patch) fips_provider_version_ge() argument
171 fips_provider_version_match(OSSL_LIB_CTX * libctx,const char * versions) fips_provider_version_match() argument
[all...]
/freebsd/crypto/openssl/providers/fips/
H A Dself_test_kats.c31 OSSL_LIB_CTX *libctx) in self_test_digest() argument
37 EVP_MD *md = EVP_MD_fetch(libctx, t->algorithm, NULL); in self_test_digest()
97 OSSL_LIB_CTX *libctx) in self_test_cipher()
110 cipher = EVP_CIPHER_fetch(libctx, t->base.algorithm, NULL); in self_test_cipher()
218 static SENTINEL OSSL_PARAM *kat_params_to_ossl_params(OSSL_LIB_CTX *libctx, ...) in kat_params_to_ossl_params()
226 bnc = BN_CTX_new_ex(libctx); in kat_params_to_ossl_params()
233 va_start(ap, libctx); in kat_params_to_ossl_params()
250 OSSL_LIB_CTX *libctx) in self_test_kdf()
260 kdf = EVP_KDF_fetch(libctx, t->algorithm, ""); in self_test_kdf()
268 params = kat_params_to_ossl_params(libctx, in self_test_kdf()
96 self_test_cipher(const ST_KAT_CIPHER * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_cipher() argument
216 kat_params_to_ossl_params(OSSL_LIB_CTX * libctx,...) kat_params_to_ossl_params() argument
248 self_test_kdf(const ST_KAT_KDF * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_kdf() argument
290 self_test_drbg(const ST_KAT_DRBG * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_drbg() argument
402 self_test_ka(const ST_KAT_KAS * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_ka() argument
484 self_test_digest_sign(const ST_KAT_SIGN * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_digest_sign() argument
612 self_test_asym_keygen(const ST_KAT_ASYM_KEYGEN * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_asym_keygen() argument
664 self_test_kem_encapsulate(const ST_KAT_KEM * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx,EVP_PKEY * pkey) self_test_kem_encapsulate() argument
720 self_test_kem_decapsulate(const ST_KAT_KEM * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx,EVP_PKEY * pkey,int reject) self_test_kem_decapsulate() argument
783 self_test_kem(const ST_KAT_KEM * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_kem() argument
822 self_test_asym_cipher(const ST_KAT_ASYM_CIPHER * t,OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_asym_cipher() argument
907 self_test_digests(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_digests() argument
918 self_test_ciphers(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_ciphers() argument
929 self_test_kems(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_kems() argument
943 self_test_asym_ciphers(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_asym_ciphers() argument
954 self_test_kdfs(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_kdfs() argument
965 self_test_drbgs(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_drbgs() argument
976 self_test_kas(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_kas() argument
991 self_test_signatures(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_signatures() argument
1112 setup_main_random(OSSL_LIB_CTX * libctx) setup_main_random() argument
1142 self_test_asym_keygens(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) self_test_asym_keygens() argument
1162 SELF_TEST_kats(OSSL_SELF_TEST * st,OSSL_LIB_CTX * libctx) SELF_TEST_kats() argument
[all...]
/freebsd/crypto/openssl/crypto/store/
H A Dstore_meth.c76 OSSL_LIB_CTX *libctx; member
97 methdata->tmp_store = ossl_method_store_new(methdata->libctx); in get_tmp_loader_store()
108 static OSSL_METHOD_STORE *get_loader_store(OSSL_LIB_CTX *libctx) in get_loader_store() argument
110 return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX); in get_loader_store()
118 && (store = get_loader_store(methdata->libctx)) == NULL) in reserve_loader_store()
129 && (store = get_loader_store(methdata->libctx)) == NULL) in unreserve_loader_store()
144 OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx); in get_loader_from_store()
150 && (store = get_loader_store(methdata->libctx)) == NULL) in get_loader_from_store()
167 if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL in put_loader_in_store()
171 if (store == NULL && (store = get_loader_store(methdata->libctx)) in put_loader_in_store()
263 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); construct_loader() local
374 OSSL_STORE_LOADER_fetch(OSSL_LIB_CTX * libctx,const char * scheme,const char * properties) OSSL_STORE_LOADER_fetch() argument
388 ossl_store_loader_store_cache_flush(OSSL_LIB_CTX * libctx) ossl_store_loader_store_cache_flush() argument
399 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); ossl_store_loader_store_remove_all_provided() local
449 OSSL_LIB_CTX *libctx = ossl_provider_libctx(loader->prov); OSSL_STORE_LOADER_is_a() local
469 OSSL_STORE_LOADER_do_all_provided(OSSL_LIB_CTX * libctx,void (* user_fn)(OSSL_STORE_LOADER * loader,void * arg),void * user_arg) OSSL_STORE_LOADER_do_all_provided() argument
497 OSSL_LIB_CTX *libctx = ossl_provider_libctx(loader->prov); OSSL_STORE_LOADER_names_do_all() local
[all...]
/freebsd/crypto/openssl/crypto/encode_decode/
H A Ddecoder_meth.c79 OSSL_LIB_CTX *libctx; member
100 methdata->tmp_store = ossl_method_store_new(methdata->libctx); in get_tmp_decoder_store()
111 static OSSL_METHOD_STORE *get_decoder_store(OSSL_LIB_CTX *libctx) in get_decoder_store() argument
113 return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_STORE_INDEX); in get_decoder_store()
121 && (store = get_decoder_store(methdata->libctx)) == NULL) in reserve_decoder_store()
132 && (store = get_decoder_store(methdata->libctx)) == NULL) in unreserve_decoder_store()
152 OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx); in get_decoder_from_store()
166 && (store = get_decoder_store(methdata->libctx)) == NULL) in get_decoder_from_store()
196 if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL in put_decoder_in_store()
200 if (store == NULL && (store = get_decoder_store(methdata->libctx)) in put_decoder_in_store()
214 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); ossl_decoder_from_algorithm() local
313 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); construct_decoder() local
428 OSSL_DECODER_fetch(OSSL_LIB_CTX * libctx,const char * name,const char * properties) OSSL_DECODER_fetch() argument
441 ossl_decoder_store_cache_flush(OSSL_LIB_CTX * libctx) ossl_decoder_store_cache_flush() argument
452 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); ossl_decoder_store_remove_all_provided() local
518 OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov); OSSL_DECODER_is_a() local
528 OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov); resolve_name() local
556 OSSL_DECODER_do_all_provided(OSSL_LIB_CTX * libctx,void (* user_fn)(OSSL_DECODER * decoder,void * arg),void * user_arg) OSSL_DECODER_do_all_provided() argument
584 OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov); OSSL_DECODER_names_do_all() local
[all...]
H A Dencoder_meth.c79 OSSL_LIB_CTX *libctx; member
100 methdata->tmp_store = ossl_method_store_new(methdata->libctx); in get_tmp_encoder_store()
111 static OSSL_METHOD_STORE *get_encoder_store(OSSL_LIB_CTX *libctx) in get_encoder_store() argument
113 return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_ENCODER_STORE_INDEX); in get_encoder_store()
121 && (store = get_encoder_store(methdata->libctx)) == NULL) in reserve_encoder_store()
132 && (store = get_encoder_store(methdata->libctx)) == NULL) in unreserve_encoder_store()
152 OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx); in get_encoder_from_store()
166 && (store = get_encoder_store(methdata->libctx)) == NULL) in get_encoder_from_store()
196 if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL in put_encoder_in_store()
200 if (store == NULL && (store = get_encoder_store(methdata->libctx)) in put_encoder_in_store()
214 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); encoder_from_algorithm() local
323 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); construct_encoder() local
437 OSSL_ENCODER_fetch(OSSL_LIB_CTX * libctx,const char * name,const char * properties) OSSL_ENCODER_fetch() argument
450 ossl_encoder_store_cache_flush(OSSL_LIB_CTX * libctx) ossl_encoder_store_cache_flush() argument
461 OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov); ossl_encoder_store_remove_all_provided() local
527 OSSL_LIB_CTX *libctx = ossl_provider_libctx(encoder->base.prov); OSSL_ENCODER_is_a() local
547 OSSL_ENCODER_do_all_provided(OSSL_LIB_CTX * libctx,void (* user_fn)(OSSL_ENCODER * encoder,void * arg),void * user_arg) OSSL_ENCODER_do_all_provided() argument
575 OSSL_LIB_CTX *libctx = ossl_provider_libctx(encoder->base.prov); OSSL_ENCODER_names_do_all() local
[all...]
/freebsd/crypto/openssl/test/helpers/
H A Dpredefined_dhparams.c18 static EVP_PKEY *get_dh_from_pg_bn(OSSL_LIB_CTX *libctx, const char *type, in get_dh_from_pg_bn() argument
21 EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_from_name(libctx, type, NULL); in get_dh_from_pg_bn()
48 static EVP_PKEY *get_dh_from_pg(OSSL_LIB_CTX *libctx, const char *type, in get_dh_from_pg() argument
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
144 return get_dh_from_pg(libctx, "DH", dh512_p, sizeof(dh512_p), in get_dh1024dsa()
148 EVP_PKEY *get_dhx512(OSSL_LIB_CTX *libctx) in get_dh1024dsa()
308 return get_dh_from_pg(libctx, "X9.42 DH",
314 EVP_PKEY *get_dh1024dsa(OSSL_LIB_CTX *libctx)
577 return get_dh_from_pg(libctx, "D
90 get_dhx512(OSSL_LIB_CTX * libctx) get_dhx512() argument
119 get_dh1024dsa(OSSL_LIB_CTX * libctx) get_dh1024dsa() argument
152 get_dh2048(OSSL_LIB_CTX * libctx) get_dh2048() argument
173 get_dh4096(OSSL_LIB_CTX * libctx) get_dh4096() argument
[all...]
/freebsd/crypto/openssl/demos/signature/
H A DEVP_ED_Signature_demo.c29 OSSL_LIB_CTX *libctx, in demo_sign()
53 if (!EVP_DigestSignInit_ex(sign_context, NULL, NULL, libctx, NULL, priv, NULL)) { in demo_sign()
89 OSSL_LIB_CTX *libctx) in demo_verify()
105 libctx, NULL, pub, NULL)) { in demo_verify()
126 static int create_key(OSSL_LIB_CTX *libctx,
139 priv = EVP_PKEY_Q_keygen(libctx, NULL, "ED25519"); in create_key()
153 pub = EVP_PKEY_new_raw_public_key_ex(libctx, "ED25519", NULL, pubdata, pubdata_len); in create_key()
171 OSSL_LIB_CTX *libctx = NULL; in main()
177 libctx = OSSL_LIB_CTX_new(); in main()
178 if (libctx in main()
30 demo_sign(EVP_PKEY * priv,const unsigned char * tbs,size_t tbs_len,OSSL_LIB_CTX * libctx,unsigned char ** sig_out_value,size_t * sig_out_len) demo_sign() argument
90 demo_verify(EVP_PKEY * pub,const unsigned char * tbs,size_t tbs_len,const unsigned char * sig_value,size_t sig_len,OSSL_LIB_CTX * libctx) demo_verify() argument
127 create_key(OSSL_LIB_CTX * libctx,EVP_PKEY ** privout,EVP_PKEY ** pubout) create_key() argument
172 OSSL_LIB_CTX *libctx = NULL; main() local
[all...]
H A DEVP_DSA_Signature_demo.c42 static int generate_dsa_params(OSSL_LIB_CTX *libctx,
50 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in generate_dsa_params()
79 static int generate_dsa_key(OSSL_LIB_CTX *libctx, in generate_dsa_params()
88 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, params, in generate_dsa_key()
159 static int demo_sign(OSSL_LIB_CTX *libctx, in extract_keypair()
170 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in demo_sign()
182 if (EVP_DigestSignInit_ex(ctx, NULL, DIGEST, libctx, NULL, pkey, NULL) != 1) in demo_sign()
224 static int demo_verify(OSSL_LIB_CTX *libctx, in demo_sign()
233 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in demo_verify()
245 if (EVP_DigestVerifyInit_ex(ctx, NULL, DIGEST, libctx, NUL in demo_verify()
46 generate_dsa_params(OSSL_LIB_CTX * libctx,EVP_PKEY ** p_params) generate_dsa_params() argument
83 generate_dsa_key(OSSL_LIB_CTX * libctx,EVP_PKEY * params,EVP_PKEY ** p_pkey) generate_dsa_key() argument
163 demo_sign(OSSL_LIB_CTX * libctx,size_t * p_sig_len,unsigned char ** p_sig_value,OSSL_PARAM keypair[]) demo_sign() argument
228 demo_verify(OSSL_LIB_CTX * libctx,size_t sig_len,unsigned char * sig_value,OSSL_PARAM public_key[]) demo_verify() argument
272 OSSL_LIB_CTX *libctx = NULL; main() local
[all...]
H A DEVP_EC_Signature_demo.c40 static EVP_PKEY *get_key(OSSL_LIB_CTX *libctx, const char *propq, int public)
58 selection, libctx, propq); in get_key()
66 static int demo_sign(OSSL_LIB_CTX *libctx, const char *sig_name, in get_key()
77 priv_key = get_key(libctx, propq, public); in demo_sign()
96 libctx, NULL, priv_key, NULL)) { in demo_sign()
146 static int demo_verify(OSSL_LIB_CTX *libctx, const char *sig_name, in demo_sign()
164 pub_key = get_key(libctx, propq, public); in demo_verify()
171 libctx, NULL, pub_key, NULL)) { in demo_verify()
203 OSSL_LIB_CTX *libctx = NULL; in demo_verify()
209 libctx in main()
44 get_key(OSSL_LIB_CTX * libctx,const char * propq,int public) get_key() argument
70 demo_sign(OSSL_LIB_CTX * libctx,const char * sig_name,size_t * sig_out_len,unsigned char ** sig_out_value) demo_sign() argument
150 demo_verify(OSSL_LIB_CTX * libctx,const char * sig_name,size_t sig_len,unsigned char * sig_value) demo_verify() argument
207 OSSL_LIB_CTX *libctx = NULL; main() local
[all...]
H A Drsa_pss_direct.c38 static int sign(OSSL_LIB_CTX *libctx, unsigned char **sig, size_t *sig_len) in sign() argument
51 sizeof(rsa_priv_key), libctx, propq); in sign()
58 md = EVP_MD_fetch(libctx, "SHA256", propq); in sign()
65 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq); in sign()
126 static int verify(OSSL_LIB_CTX *libctx, const unsigned char *sig, size_t sig_len) in verify()
143 md = EVP_MD_fetch(libctx, "SHA256", propq); in verify()
150 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq); in verify()
192 OSSL_LIB_CTX *libctx = NULL; in main()
196 if (sign(libctx, &sig, &sig_len) == 0) in main()
199 if (verify(libctx, si in main()
124 verify(OSSL_LIB_CTX * libctx,const unsigned char * sig,size_t sig_len) verify() argument
189 OSSL_LIB_CTX *libctx = NULL; main() local
[all...]
/freebsd/crypto/openssl/crypto/ffc/
H A Dffc_params_validate.c52 int ossl_ffc_params_FIPS186_4_validate(OSSL_LIB_CTX *libctx, in ossl_ffc_params_FIPS186_4_validate() argument
64 return ossl_ffc_params_FIPS186_4_gen_verify(libctx, (FFC_PARAMS *)params, in ossl_ffc_params_FIPS186_4_validate()
70 int ossl_ffc_params_FIPS186_2_validate(OSSL_LIB_CTX *libctx, in ossl_ffc_params_FIPS186_2_validate() argument
84 return ossl_ffc_params_FIPS186_2_gen_verify(libctx, (FFC_PARAMS *)params, in ossl_ffc_params_FIPS186_2_validate()
95 int ossl_ffc_params_simple_validate(OSSL_LIB_CTX *libctx, const FFC_PARAMS *params, in ossl_ffc_params_simple_validate() argument
116 ret = ossl_ffc_params_FIPS186_2_validate(libctx, &tmpparams, paramstype, in ossl_ffc_params_simple_validate()
120 ret = ossl_ffc_params_FIPS186_4_validate(libctx, &tmpparams, paramstype, in ossl_ffc_params_simple_validate()
139 int ossl_ffc_params_full_validate(OSSL_LIB_CTX *libctx, const FFC_PARAMS *params, in ossl_ffc_params_full_validate() argument
151 return ossl_ffc_params_FIPS186_4_validate(libctx, params, paramstype, in ossl_ffc_params_full_validate()
156 return ossl_ffc_params_FIPS186_2_validate(libctx, param in ossl_ffc_params_full_validate()
[all...]
/freebsd/crypto/openssl/crypto/
H A Dprovider.c18 OSSL_PROVIDER *OSSL_PROVIDER_try_load_ex(OSSL_LIB_CTX *libctx, const char *name, in OSSL_PROVIDER_try_load_ex() argument
25 if ((prov = ossl_provider_find(libctx, name, 0)) == NULL) { in OSSL_PROVIDER_try_load_ex()
26 if ((prov = ossl_provider_new(libctx, name, NULL, params, 0)) == NULL) in OSSL_PROVIDER_try_load_ex()
52 OSSL_PROVIDER *OSSL_PROVIDER_try_load(OSSL_LIB_CTX *libctx, const char *name, in OSSL_PROVIDER_try_load() argument
55 return OSSL_PROVIDER_try_load_ex(libctx, name, NULL, retain_fallbacks); in OSSL_PROVIDER_try_load()
58 OSSL_PROVIDER *OSSL_PROVIDER_load_ex(OSSL_LIB_CTX *libctx, const char *name, OSSL_PARAM *params) in OSSL_PROVIDER_load_ex() argument
61 if (ossl_provider_disable_fallback_loading(libctx)) in OSSL_PROVIDER_load_ex()
62 return OSSL_PROVIDER_try_load_ex(libctx, name, params, 0); in OSSL_PROVIDER_load_ex()
66 OSSL_PROVIDER *OSSL_PROVIDER_load(OSSL_LIB_CTX *libctx, const char *name) in OSSL_PROVIDER_load() argument
68 return OSSL_PROVIDER_load_ex(libctx, nam in OSSL_PROVIDER_load()
126 OSSL_PROVIDER_add_builtin(OSSL_LIB_CTX * libctx,const char * name,OSSL_provider_init_fn * init_fn) OSSL_PROVIDER_add_builtin() argument
[all...]
/freebsd/crypto/openssl/providers/common/
H A Dsecuritycheck_fips.c22 int ossl_fips_config_securitycheck_enabled(OSSL_LIB_CTX *libctx) in ossl_fips_config_securitycheck_enabled() argument
25 return ossl_fips_config_security_checks(libctx); in ossl_fips_config_securitycheck_enabled()
37 OSSL_LIB_CTX *libctx, in ossl_fips_ind_rsa_key_check() argument
43 if (!ossl_FIPS_IND_on_unapproved(ind, id, libctx, desc, "Key size", in ossl_fips_ind_rsa_key_check()
55 OSSL_LIB_CTX *libctx, in ossl_fips_ind_ec_key_check() argument
68 if (!ossl_FIPS_IND_on_unapproved(ind, id, libctx, desc, "EC Key", in ossl_fips_ind_ec_key_check()
82 OSSL_LIB_CTX *libctx, in ossl_fips_ind_digest_exch_check() argument
89 if (!ossl_FIPS_IND_on_unapproved(ind, id, libctx, desc, "Digest", in ossl_fips_ind_digest_exch_check()
99 OSSL_LIB_CTX *libctx, in ossl_fips_ind_digest_sign_check() argument
127 if (!ossl_FIPS_IND_on_unapproved(ind, id, libctx, des in ossl_fips_ind_digest_sign_check()
[all...]
/freebsd/crypto/openssl/demos/keyexch/
H A Decdh.c41 static int get_peer_public_key(PEER_DATA *peer, OSSL_LIB_CTX *libctx) in get_peer_public_key() argument
56 ctx = EVP_PKEY_CTX_new_from_name(libctx, "EC", NULL); in get_peer_public_key()
72 static int create_peer(PEER_DATA *peer, OSSL_LIB_CTX *libctx) in create_peer()
82 ctx = EVP_PKEY_CTX_new_from_name(libctx, "EC", NULL); in create_peer()
89 || !get_peer_public_key(peer, libctx)) { in create_peer()
107 OSSL_LIB_CTX *libctx) in generate_secret()
114 derivectx = EVP_PKEY_CTX_new_from_pkey(libctx, peerA->priv, NULL); in generate_secret()
184 * Setting libctx to NULL uses the default library context in main()
187 OSSL_LIB_CTX *libctx = NULL; in main()
190 if (!create_peer(&peer1, libctx) in main()
71 create_peer(PEER_DATA * peer,OSSL_LIB_CTX * libctx) create_peer() argument
106 generate_secret(PEER_DATA * peerA,EVP_PKEY * peerBpub,OSSL_LIB_CTX * libctx) generate_secret() argument
186 OSSL_LIB_CTX *libctx = NULL; main() local
[all...]
H A Dx25519.c64 OSSL_LIB_CTX *libctx, in keyexch_x25519_before() argument
73 local_peer->privk = EVP_PKEY_new_raw_private_key_ex(libctx, "X25519", propq, in keyexch_x25519_before()
77 local_peer->privk = EVP_PKEY_Q_keygen(libctx, propq, "X25519"); in keyexch_x25519_before()
118 OSSL_LIB_CTX *libctx, in keyexch_x25519_after() argument
130 remote_peer_pubk = EVP_PKEY_new_raw_public_key_ex(libctx, "X25519", propq, in keyexch_x25519_after()
138 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, local_peer->privk, propq); in keyexch_x25519_after()
206 OSSL_LIB_CTX *libctx = NULL; in keyexch_x25519() local
214 if (keyexch_x25519_before(libctx, use_kat ? peer1_privk_data : NULL, in keyexch_x25519()
219 if (keyexch_x25519_before(libctx, use_kat ? peer2_privk_data : NULL, in keyexch_x25519()
229 if (keyexch_x25519_after(libctx, use_ka in keyexch_x25519()
[all...]
/freebsd/crypto/openssl/crypto/bio/
H A Dbss_core.c35 static ossl_inline BIO_CORE_GLOBALS *get_globals(OSSL_LIB_CTX *libctx) in get_globals() argument
37 return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_BIO_CORE_INDEX); in get_globals()
43 BIO_CORE_GLOBALS *bcgbl = get_globals(bio->libctx); in bio_core_read_ex()
53 BIO_CORE_GLOBALS *bcgbl = get_globals(bio->libctx); in bio_core_write_ex()
62 BIO_CORE_GLOBALS *bcgbl = get_globals(bio->libctx); in bio_core_ctrl()
71 BIO_CORE_GLOBALS *bcgbl = get_globals(bio->libctx); in bio_core_gets()
80 BIO_CORE_GLOBALS *bcgbl = get_globals(bio->libctx); in bio_core_puts()
96 BIO_CORE_GLOBALS *bcgbl = get_globals(bio->libctx); in bio_core_free()
127 BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio) in BIO_new_from_core_bio() argument
130 BIO_CORE_GLOBALS *bcgbl = get_globals(libctx); in BIO_new_from_core_bio()
147 ossl_bio_init_core(OSSL_LIB_CTX * libctx,const OSSL_DISPATCH * fns) ossl_bio_init_core() argument
[all...]
/freebsd/crypto/openssl/crypto/x509/
H A Dx509_d2.c15 int X509_STORE_set_default_paths_ex(X509_STORE *ctx, OSSL_LIB_CTX *libctx, in X509_STORE_set_default_paths_ex() argument
23 X509_LOOKUP_load_file_ex(lookup, NULL, X509_FILETYPE_DEFAULT, libctx, propq); in X509_STORE_set_default_paths_ex()
38 X509_LOOKUP_add_store_ex(lookup, NULL, libctx, propq); in X509_STORE_set_default_paths_ex()
51 OSSL_LIB_CTX *libctx, const char *propq) in X509_STORE_load_file_ex() argument
57 || X509_LOOKUP_load_file_ex(lookup, file, X509_FILETYPE_PEM, libctx, in X509_STORE_load_file_ex()
83 OSSL_LIB_CTX *libctx, const char *propq) in X509_STORE_load_store_ex()
89 || X509_LOOKUP_add_store_ex(lookup, uri, libctx, propq) == 0) in X509_STORE_load_store_ex()
101 const char *path, OSSL_LIB_CTX *libctx, in X509_STORE_load_locations_ex()
106 if (file != NULL && !X509_STORE_load_file_ex(ctx, file, libctx, propq)) in X509_STORE_load_locations_ex()
82 X509_STORE_load_store_ex(X509_STORE * ctx,const char * uri,OSSL_LIB_CTX * libctx,const char * propq) X509_STORE_load_store_ex() argument
100 X509_STORE_load_locations_ex(X509_STORE * ctx,const char * file,const char * path,OSSL_LIB_CTX * libctx,const char * propq) X509_STORE_load_locations_ex() argument
/freebsd/crypto/openssl/demos/encrypt/
H A Drsa_encrypt.c35 static EVP_PKEY *get_key(OSSL_LIB_CTX *libctx, const char *propq, int public)
53 selection, libctx, propq); in get_key()
95 static int do_encrypt(OSSL_LIB_CTX *libctx,
108 pub_key = get_key(libctx, propq, public); in do_encrypt()
113 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pub_key, propq); in do_encrypt()
153 static int do_decrypt(OSSL_LIB_CTX *libctx, const unsigned char *in, size_t in_len,
165 priv_key = get_key(libctx, propq, public); in do_decrypt()
170 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, priv_key, propq); in do_decrypt()
218 OSSL_LIB_CTX *libctx = NULL; in main()
220 if (!do_encrypt(libctx, ms in main()
36 get_key(OSSL_LIB_CTX * libctx,const char * propq,int public) get_key() argument
96 do_encrypt(OSSL_LIB_CTX * libctx,const unsigned char * in,size_t in_len,unsigned char ** out,size_t * out_len) do_encrypt() argument
154 do_decrypt(OSSL_LIB_CTX * libctx,const unsigned char * in,size_t in_len,unsigned char ** out,size_t * out_len) do_decrypt() argument
219 OSSL_LIB_CTX *libctx = NULL; main() local
[all...]
/freebsd/crypto/openssl/providers/fips/include/fips/
H A Dfipsindicator.h60 typedef int(OSSL_FIPS_IND_CHECK_CB)(OSSL_LIB_CTX *libctx);
62 int ossl_FIPS_IND_callback(OSSL_LIB_CTX *libctx, const char *type,
69 int ossl_FIPS_IND_on_unapproved(OSSL_FIPS_IND *ind, int id, OSSL_LIB_CTX *libctx,
99 #define OSSL_FIPS_IND_ON_UNAPPROVED(ctx, id, libctx, algname, opname, config_check_fn) \ argument
100 ossl_FIPS_IND_on_unapproved(&ctx->indicator, id, libctx, algname, opname, config_check_fn)
125 int ossl_fips_ind_rsa_key_check(OSSL_FIPS_IND *ind, int id, OSSL_LIB_CTX *libctx,
128 int ossl_fips_ind_ec_key_check(OSSL_FIPS_IND *ind, int id, OSSL_LIB_CTX *libctx,
132 int ossl_fips_ind_digest_exch_check(OSSL_FIPS_IND *ind, int id, OSSL_LIB_CTX *libctx,
135 OSSL_LIB_CTX *libctx,
145 #define OSSL_FIPS_IND_ON_UNAPPROVED(ctx, id, libctx, algnam argument
[all...]

12345678910>>...27