| /src/crypto/openssl/test/ |
| H A D | provider_test.c | 37 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() 116 legacy = OSSL_PROVIDER_load(*libctx, "legacy"); in test_provider() 117 deflt = OSSL_PROVIDER_load(*libctx, "default"); in test_provider() 119 || !TEST_true(OSSL_PROVIDER_available(*libctx, "default"))) in test_provider() [all …]
|
| H A D | provider_pkey_test.c | 21 static OSSL_LIB_CTX *libctx = NULL; variable 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, "RSA", NULL))) in test_alternative_keygen_init() 152 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_alternative_keygen_init() [all …]
|
| H A D | pairwise_fail_test.c | 29 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() 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, "ML-DSA-87", NULL))) in test_keygen_pairwise_failure() 150 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "SLH-DSA-SHA2-256f", NULL))) in test_keygen_pairwise_failure() [all …]
|
| H A D | provfetchtest.c | 206 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() 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, "DUMMY", in fetch_test() 259 encoder = OSSL_ENCODER_fetch(libctx, "DUMMY", in fetch_test() [all …]
|
| H A D | user_property_test.c | 88 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()
|
| /src/crypto/openssl/crypto/evp/ |
| H A D | evp_fetch.c | 28 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)) == NULL) in put_evp_method_in_store() [all …]
|
| /src/crypto/openssl/test/testutil/ |
| H A D | provider.c | 16 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() 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, "fips")) == NULL) in fips_provider_version() 99 int fips_provider_version_eq(OSSL_LIB_CTX *libctx, int major, int minor, int patch) in fips_provider_version_eq() argument 104 if ((res = fips_provider_version(libctx, &prov)) <= 0) in fips_provider_version_eq() [all …]
|
| /src/crypto/openssl/providers/fips/ |
| H A D | self_test_kats.c | 31 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() argument 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() argument 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() argument 260 kdf = EVP_KDF_fetch(libctx, t->algorithm, ""); in self_test_kdf() 268 params = kat_params_to_ossl_params(libctx, t->params, NULL); in self_test_kdf() [all …]
|
| /src/crypto/openssl/crypto/store/ |
| H A D | store_meth.c | 76 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)) == NULL) in put_loader_in_store() [all …]
|
| /src/crypto/openssl/crypto/encode_decode/ |
| H A D | decoder_meth.c | 79 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)) == NULL) in put_decoder_in_store() [all …]
|
| H A D | encoder_meth.c | 79 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)) == NULL) in put_encoder_in_store() [all …]
|
| /src/crypto/openssl/test/helpers/ |
| H A D | predefined_dhparams.c | 18 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_dh512() 148 EVP_PKEY *get_dhx512(OSSL_LIB_CTX *libctx) in get_dhx512() argument 308 return get_dh_from_pg(libctx, "X9.42 DH", in get_dhx512() 314 EVP_PKEY *get_dh1024dsa(OSSL_LIB_CTX *libctx) in get_dh1024dsa() argument 577 return get_dh_from_pg(libctx, "DH", dh1024_p, sizeof(dh1024_p), in get_dh1024dsa() [all …]
|
| /src/crypto/openssl/demos/signature/ |
| H A D | EVP_ED_Signature_demo.c | 29 OSSL_LIB_CTX *libctx, in demo_sign() argument 53 if (!EVP_DigestSignInit_ex(sign_context, NULL, NULL, libctx, NULL, priv, NULL)) { in demo_sign() 89 OSSL_LIB_CTX *libctx) in demo_verify() argument 105 libctx, NULL, pub, NULL)) { in demo_verify() 126 static int create_key(OSSL_LIB_CTX *libctx, in create_key() argument 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() local 177 libctx = OSSL_LIB_CTX_new(); in main() 178 if (libctx == NULL) { in main() [all …]
|
| H A D | EVP_DSA_Signature_demo.c | 42 static int generate_dsa_params(OSSL_LIB_CTX *libctx, in generate_dsa_params() argument 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_key() argument 88 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, params, in generate_dsa_key() 159 static int demo_sign(OSSL_LIB_CTX *libctx, in demo_sign() argument 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_verify() argument 233 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in demo_verify() 245 if (EVP_DigestVerifyInit_ex(ctx, NULL, DIGEST, libctx, NULL, pkey, NULL) != 1) in demo_verify() [all …]
|
| H A D | EVP_EC_Signature_demo.c | 40 static EVP_PKEY *get_key(OSSL_LIB_CTX *libctx, const char *propq, int public) in get_key() argument 58 selection, libctx, propq); in get_key() 66 static int demo_sign(OSSL_LIB_CTX *libctx, const char *sig_name, in demo_sign() argument 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_verify() argument 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 main() local 209 libctx = OSSL_LIB_CTX_new(); in main() [all …]
|
| H A D | rsa_pss_direct.c | 38 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() argument 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() local 196 if (sign(libctx, &sig, &sig_len) == 0) in main() 199 if (verify(libctx, sig, sig_len) == 0) in main() [all …]
|
| /src/crypto/openssl/crypto/ffc/ |
| H A D | ffc_params_validate.c | 52 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, params, paramstype, in ossl_ffc_params_full_validate() [all …]
|
| /src/crypto/openssl/crypto/ |
| H A D | provider.c | 18 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, name, NULL); in OSSL_PROVIDER_load() [all …]
|
| /src/crypto/openssl/providers/common/ |
| H A D | securitycheck_fips.c | 22 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, desc, op, in ossl_fips_ind_digest_sign_check()
|
| /src/crypto/openssl/demos/keyexch/ |
| H A D | ecdh.c | 41 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() argument 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() argument 114 derivectx = EVP_PKEY_CTX_new_from_pkey(libctx, peerA->priv, NULL); in generate_secret() 187 OSSL_LIB_CTX *libctx = NULL; in main() local 190 if (!create_peer(&peer1, libctx) in main() 191 || !create_peer(&peer2, libctx)) { in main() [all …]
|
| H A D | x25519.c | 64 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_kat, &peer1, peer2.pubk_data) == 0) in keyexch_x25519() [all …]
|
| /src/crypto/openssl/crypto/bio/ |
| H A D | bss_core.c | 35 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() [all …]
|
| /src/crypto/openssl/crypto/x509/ |
| H A D | x509_d2.c | 15 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() argument 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() argument 106 if (file != NULL && !X509_STORE_load_file_ex(ctx, file, libctx, propq)) in X509_STORE_load_locations_ex()
|
| /src/crypto/openssl/providers/fips/include/fips/ |
| H A D | fipsindicator.h | 60 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, algname, opname, configopt_fn) argument
|
| /src/crypto/openssl/demos/encrypt/ |
| H A D | rsa_encrypt.c | 35 static EVP_PKEY *get_key(OSSL_LIB_CTX *libctx, const char *propq, int public) in get_key() argument 53 selection, libctx, propq); in get_key() 95 static int do_encrypt(OSSL_LIB_CTX *libctx, in do_encrypt() argument 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, in do_decrypt() argument 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() local 220 if (!do_encrypt(libctx, msg, msg_len, &encrypted, &encrypted_len)) { in main() [all …]
|