| /src/crypto/openssl/crypto/rsa/ |
| H A D | rsa_meth.c | 22 RSA_METHOD *meth = OPENSSL_zalloc(sizeof(*meth)); in RSA_meth_new() local 24 if (meth != NULL) { in RSA_meth_new() 25 meth->flags = flags; in RSA_meth_new() 27 meth->name = OPENSSL_strdup(name); in RSA_meth_new() 28 if (meth->name != NULL) in RSA_meth_new() 29 return meth; in RSA_meth_new() 31 OPENSSL_free(meth); in RSA_meth_new() 37 void RSA_meth_free(RSA_METHOD *meth) in RSA_meth_free() argument 39 if (meth != NULL) { in RSA_meth_free() 40 OPENSSL_free(meth->name); in RSA_meth_free() [all …]
|
| H A D | rsa_schemes.c | 17 static int meth2nid(const void *meth, in meth2nid() argument 18 int (*meth_is_a)(const void *meth, const char *name), in meth2nid() argument 23 if (meth != NULL) in meth2nid() 25 if (meth_is_a(meth, items[i].ptr)) in meth2nid() 30 static const char *nid2name(int meth, const OSSL_ITEM *items, size_t items_n) in nid2name() argument 35 if (meth == (int)items[i].id) in nid2name()
|
| /src/crypto/openssl/crypto/ec/ |
| H A D | ec_kmeth.c | 49 void EC_KEY_set_default_method(const EC_KEY_METHOD *meth) in EC_KEY_set_default_method() argument 51 if (meth == NULL) in EC_KEY_set_default_method() 54 default_ec_key_meth = meth; in EC_KEY_set_default_method() 59 return key->meth; in EC_KEY_get_method() 62 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth) in EC_KEY_set_method() argument 64 void (*finish)(EC_KEY *key) = key->meth->finish; in EC_KEY_set_method() 74 key->meth = meth; in EC_KEY_set_method() 75 if (meth->init != NULL) in EC_KEY_set_method() 76 return meth->init(key); in EC_KEY_set_method() 100 ret->meth = EC_KEY_get_default_method(); in ossl_ec_key_new_method_int() [all …]
|
| H A D | ecp_smpl.c | 174 if (group->meth->field_encode != NULL) { in ossl_ec_GFp_simple_group_set_curve() 175 if (!group->meth->field_encode(group, group->a, tmp_a, ctx)) in ossl_ec_GFp_simple_group_set_curve() 183 if (group->meth->field_encode != NULL) in ossl_ec_GFp_simple_group_set_curve() 184 if (!group->meth->field_encode(group, group->b, group->b, ctx)) in ossl_ec_GFp_simple_group_set_curve() 212 if (group->meth->field_decode != NULL) { in ossl_ec_GFp_simple_group_get_curve() 219 if (!group->meth->field_decode(group, a, group->a, ctx)) in ossl_ec_GFp_simple_group_get_curve() 223 if (!group->meth->field_decode(group, b, group->b, ctx)) in ossl_ec_GFp_simple_group_get_curve() 274 if (group->meth->field_decode != NULL) { in ossl_ec_GFp_simple_group_check_discriminant() 275 if (!group->meth->field_decode(group, a, group->a, ctx)) in ossl_ec_GFp_simple_group_check_discriminant() 277 if (!group->meth->field_decode(group, b, group->b, ctx)) in ossl_ec_GFp_simple_group_check_discriminant() [all …]
|
| H A D | ec_lib.c | 31 const EC_METHOD *meth) in ossl_ec_group_new_ex() argument 35 if (meth == NULL) { in ossl_ec_group_new_ex() 39 if (meth->group_init == 0) { in ossl_ec_group_new_ex() 54 ret->meth = meth; in ossl_ec_group_new_ex() 55 if ((ret->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) { in ossl_ec_group_new_ex() 65 if (!meth->group_init(ret)) in ossl_ec_group_new_ex() 79 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth) in EC_GROUP_new() argument 81 return ossl_ec_group_new_ex(NULL, NULL, meth); in EC_GROUP_new() 128 if (group->meth->group_finish != 0) in EC_GROUP_free() 129 group->meth->group_finish(group); in EC_GROUP_free() [all …]
|
| H A D | ec_oct.c | 27 if (group->meth->point_set_compressed_coordinates == NULL in EC_POINT_set_compressed_coordinates() 28 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { in EC_POINT_set_compressed_coordinates() 36 if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) { in EC_POINT_set_compressed_coordinates() 37 if (group->meth->field_type == NID_X9_62_prime_field) in EC_POINT_set_compressed_coordinates() 51 return group->meth->point_set_compressed_coordinates(group, point, x, in EC_POINT_set_compressed_coordinates() 81 if (group->meth->point2oct == 0 in EC_POINT_point2oct() 82 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { in EC_POINT_point2oct() 90 if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) { in EC_POINT_point2oct() 91 if (group->meth->field_type == NID_X9_62_prime_field) in EC_POINT_point2oct() 106 return group->meth->point2oct(group, point, form, buf, len, ctx); in EC_POINT_point2oct() [all …]
|
| H A D | ec_key.c | 56 if (ret->meth->set_group != NULL in EC_KEY_new_by_curve_name_ex() 57 && ret->meth->set_group(ret, ret->group) == 0) { in EC_KEY_new_by_curve_name_ex() 84 if (r->meth != NULL && r->meth->finish != NULL) in EC_KEY_free() 85 r->meth->finish(r); in EC_KEY_free() 91 if (r->group && r->group->meth->keyfinish) in EC_KEY_free() 92 r->group->meth->keyfinish(r); in EC_KEY_free() 112 if (src->meth != dest->meth) { in EC_KEY_copy() 113 if (dest->meth->finish != NULL) in EC_KEY_copy() 114 dest->meth->finish(dest); in EC_KEY_copy() 115 if (dest->group && dest->group->meth->keyfinish) in EC_KEY_copy() [all …]
|
| H A D | ec_cvt.c | 24 const EC_METHOD *meth; in EC_GROUP_new_curve_GFp() local 49 meth = EC_GFp_mont_method(); in EC_GROUP_new_curve_GFp() 52 meth = EC_GFp_nist_method(); in EC_GROUP_new_curve_GFp() 54 meth = EC_GFp_mont_method(); in EC_GROUP_new_curve_GFp() 57 ret = ossl_ec_group_new_ex(ossl_bn_get_libctx(ctx), NULL, meth); in EC_GROUP_new_curve_GFp() 73 const EC_METHOD *meth; in EC_GROUP_new_curve_GF2m() local 76 meth = EC_GF2m_simple_method(); in EC_GROUP_new_curve_GF2m() 78 ret = ossl_ec_group_new_ex(ossl_bn_get_libctx(ctx), NULL, meth); in EC_GROUP_new_curve_GF2m()
|
| H A D | ec2_smpl.c | 419 if (!group->meth->field_div(group, s, s, t, ctx)) in ossl_ec_GF2m_simple_add() 421 if (!group->meth->field_sqr(group, x2, s, ctx)) in ossl_ec_GF2m_simple_add() 436 if (!group->meth->field_div(group, s, y1, x1, ctx)) in ossl_ec_GF2m_simple_add() 441 if (!group->meth->field_sqr(group, x2, s, ctx)) in ossl_ec_GF2m_simple_add() 451 if (!group->meth->field_mul(group, y2, y2, s, ctx)) in ossl_ec_GF2m_simple_add() 488 if (group->meth->make_affine == NULL in ossl_ec_GF2m_simple_invert() 489 || !group->meth->make_affine(group, point, ctx)) in ossl_ec_GF2m_simple_invert() 521 field_mul = group->meth->field_mul; in ossl_ec_GF2m_simple_is_on_curve() 522 field_sqr = group->meth->field_sqr; in ossl_ec_GF2m_simple_is_on_curve() 685 if (!group->meth->make_affine(group, points[i], ctx)) in ossl_ec_GF2m_simple_points_make_affine() [all …]
|
| H A D | ecdsa_sign.c | 29 if (eckey->meth->sign_sig != NULL) in ECDSA_do_sign_ex() 30 return eckey->meth->sign_sig(dgst, dlen, kinv, rp, eckey); in ECDSA_do_sign_ex() 44 if (eckey->meth->sign != NULL) in ECDSA_sign_ex() 45 return eckey->meth->sign(type, dgst, dlen, sig, siglen, kinv, r, eckey); in ECDSA_sign_ex() 53 if (eckey->meth->sign_setup != NULL) in ECDSA_sign_setup() 54 return eckey->meth->sign_setup(eckey, ctx_in, kinvp, rp); in ECDSA_sign_setup()
|
| /src/crypto/openssl/ssl/statem/ |
| H A D | extensions_cust.c | 86 custom_ext_method *meth = exts->meths; in custom_ext_find() local 88 for (i = 0; i < exts->meths_count; i++, meth++) { in custom_ext_find() 89 if (ext_type == meth->ext_type in custom_ext_find() 90 && (role == ENDPOINT_BOTH || role == meth->role in custom_ext_find() 91 || meth->role == ENDPOINT_BOTH)) { in custom_ext_find() 94 return meth; in custom_ext_find() 106 custom_ext_method *meth = exts->meths; in custom_ext_init() local 108 for (i = 0; i < exts->meths_count; i++, meth++) in custom_ext_init() 109 meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED); in custom_ext_init() 120 custom_ext_method *meth; in custom_ext_parse() local [all …]
|
| /src/crypto/openssl/crypto/comp/ |
| H A D | comp_lib.c | 18 COMP_CTX *COMP_CTX_new(COMP_METHOD *meth) in COMP_CTX_new() argument 22 if (meth == NULL) in COMP_CTX_new() 27 ret->meth = meth; in COMP_CTX_new() 28 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { in COMP_CTX_new() 37 return ctx->meth; in COMP_CTX_get_method() 40 int COMP_get_type(const COMP_METHOD *meth) in COMP_get_type() argument 42 if (meth == NULL) in COMP_get_type() 44 return meth->type; in COMP_get_type() 47 const char *COMP_get_name(const COMP_METHOD *meth) in COMP_get_name() argument 49 if (meth == NULL) in COMP_get_name() [all …]
|
| /src/crypto/openssl/crypto/dso/ |
| H A D | dso_lib.c | 13 static DSO *DSO_new_method(DSO_METHOD *meth) in DSO_new_method() argument 27 ret->meth = DSO_METHOD_openssl(); in DSO_new_method() 34 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { in DSO_new_method() 63 if ((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) { in DSO_free() 69 if ((dso->meth->finish != NULL) && !dso->meth->finish(dso)) { in DSO_free() 104 DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags) in DSO_load() argument 110 ret = DSO_new_method(meth); in DSO_load() 142 if (ret->meth->dso_load == NULL) { in DSO_load() 146 if (!ret->meth->dso_load(ret)) { in DSO_load() 166 if (dso->meth->dso_bind_func == NULL) { in DSO_bind_func() [all …]
|
| /src/crypto/openssl/crypto/evp/ |
| H A D | kdf_lib.c | 40 ctx->meth = kdf; in EVP_KDF_CTX_new() 49 ctx->meth->freectx(ctx->algctx); in EVP_KDF_CTX_free() 51 EVP_KDF_free(ctx->meth); in EVP_KDF_CTX_free() 59 if (src == NULL || src->algctx == NULL || src->meth->dupctx == NULL) in EVP_KDF_CTX_dup() 67 if (!EVP_KDF_up_ref(dst->meth)) { in EVP_KDF_CTX_dup() 73 dst->algctx = src->meth->dupctx(src->algctx); in EVP_KDF_CTX_dup() 108 return ctx->meth; in EVP_KDF_CTX_kdf() 116 if (ctx->meth->reset != NULL) in EVP_KDF_CTX_reset() 117 ctx->meth->reset(ctx->algctx); in EVP_KDF_CTX_reset() 129 if (ctx->meth->get_ctx_params != NULL in EVP_KDF_CTX_get_kdf_size() [all …]
|
| H A D | mac_lib.c | 27 ctx->meth = mac; in EVP_MAC_CTX_new() 43 ctx->meth->freectx(ctx->algctx); in EVP_MAC_CTX_free() 46 EVP_MAC_free(ctx->meth); in EVP_MAC_CTX_free() 62 if (!EVP_MAC_up_ref(dst->meth)) { in EVP_MAC_CTX_dup() 68 dst->algctx = src->meth->dupctx(src->algctx); in EVP_MAC_CTX_dup() 79 return ctx->meth; in EVP_MAC_CTX_get0_mac() 90 if (ctx->meth->get_ctx_params != NULL) { in get_size_t_ctx_param() 91 if (ctx->meth->get_ctx_params(ctx->algctx, params)) in get_size_t_ctx_param() 93 } else if (ctx->meth->get_params != NULL) { in get_size_t_ctx_param() 94 if (ctx->meth->get_params(params)) in get_size_t_ctx_param() [all …]
|
| H A D | evp_rand.c | 96 if (rand->meth->enable_locking != NULL) in EVP_RAND_enable_locking() 97 return rand->meth->enable_locking(rand->algctx); in EVP_RAND_enable_locking() 105 if (rand->meth->lock != NULL) in evp_rand_lock() 106 return rand->meth->lock(rand->algctx); in evp_rand_lock() 113 if (rand->meth->unlock != NULL) in evp_rand_unlock() 114 rand->meth->unlock(rand->algctx); in evp_rand_unlock() 365 parent_dispatch = parent->meth->dispatch; in EVP_RAND_CTX_new() 378 ctx->meth = rand; in EVP_RAND_CTX_new() 395 ctx->meth->freectx(ctx->algctx); in EVP_RAND_CTX_free() 397 EVP_RAND_free(ctx->meth); in EVP_RAND_CTX_free() [all …]
|
| /src/crypto/openssl/crypto/rand/ |
| H A D | rand_lib.c | 184 const RAND_METHOD *meth = default_RAND_meth; in ossl_rand_cleanup_int() local 189 if (meth != NULL && meth->cleanup != NULL) in ossl_rand_cleanup_int() 190 meth->cleanup(); in ossl_rand_cleanup_int() 229 const RAND_METHOD *meth = RAND_get_rand_method(); in RAND_poll() local 230 int ret = meth == RAND_OpenSSL(); in RAND_poll() 232 if (meth == NULL) in RAND_poll() 247 if (meth->add == NULL in RAND_poll() 248 || meth->add(ossl_rand_pool_buffer(pool), in RAND_poll() 266 static int rand_set_rand_method_internal(const RAND_METHOD *meth, in rand_set_rand_method_internal() argument 278 default_RAND_meth = meth; in rand_set_rand_method_internal() [all …]
|
| /src/crypto/openssl/crypto/dh/ |
| H A D | dh_lib.c | 32 int DH_set_method(DH *dh, const DH_METHOD *meth) in DH_set_method() argument 39 mtmp = dh->meth; in DH_set_method() 46 dh->meth = meth; in DH_set_method() 47 if (meth->init) in DH_set_method() 48 meth->init(dh); in DH_set_method() 54 return dh->meth; in ossl_dh_get_method() 95 ret->meth = DH_get_default_method(); in dh_new_intern() 97 ret->flags = ret->meth->flags; /* early default init */ in dh_new_intern() 107 ret->meth = ENGINE_get_DH(ret->engine); in dh_new_intern() 108 if (ret->meth == NULL) { in dh_new_intern() [all …]
|
| /src/crypto/openssl/crypto/dsa/ |
| H A D | dsa_lib.c | 106 int DSA_set_method(DSA *dsa, const DSA_METHOD *meth) in DSA_set_method() argument 113 mtmp = dsa->meth; in DSA_set_method() 120 dsa->meth = meth; in DSA_set_method() 121 if (meth->init) in DSA_set_method() 122 meth->init(dsa); in DSA_set_method() 129 return d->meth; in DSA_get_method() 153 ret->meth = DSA_get_default_method(); in dsa_new_intern() 155 ret->flags = ret->meth->flags & ~DSA_FLAG_NON_FIPS_ALLOW; /* early default init */ in dsa_new_intern() 165 ret->meth = ENGINE_get_DSA(ret->engine); in dsa_new_intern() 166 if (ret->meth == NULL) { in dsa_new_intern() [all …]
|
| /src/crypto/openssl/crypto/conf/ |
| H A D | conf_lib.c | 40 int CONF_set_default_method(CONF_METHOD *meth) in CONF_set_default_method() argument 42 default_CONF_method = meth; in CONF_set_default_method() 182 CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth) in NCONF_new_ex() argument 186 if (meth == NULL) in NCONF_new_ex() 187 meth = NCONF_default(); in NCONF_new_ex() 189 ret = meth->create(meth); in NCONF_new_ex() 199 CONF *NCONF_new(CONF_METHOD *meth) in NCONF_new() argument 201 return NCONF_new_ex(NULL, meth); in NCONF_new() 208 conf->meth->destroy(conf); in NCONF_free() 215 conf->meth->destroy_data(conf); in NCONF_free_data() [all …]
|
| /src/crypto/openssl/crypto/ |
| H A D | ex_data.c | 83 sk_EX_CALLBACK_pop_free(ip->meth, cleanup_cb); in ossl_crypto_cleanup_all_ex_data_int() 84 ip->meth = NULL; in ossl_crypto_cleanup_all_ex_data_int() 126 if (idx < 0 || idx >= sk_EX_CALLBACK_num(ip->meth)) in ossl_crypto_free_ex_index_ex() 128 a = sk_EX_CALLBACK_value(ip->meth, idx); in ossl_crypto_free_ex_index_ex() 167 if (ip->meth == NULL) { in ossl_crypto_get_ex_new_index_ex() 168 ip->meth = sk_EX_CALLBACK_new_null(); in ossl_crypto_get_ex_new_index_ex() 171 if (ip->meth == NULL in ossl_crypto_get_ex_new_index_ex() 172 || !sk_EX_CALLBACK_push(ip->meth, NULL)) { in ossl_crypto_get_ex_new_index_ex() 173 sk_EX_CALLBACK_free(ip->meth); in ossl_crypto_get_ex_new_index_ex() 174 ip->meth = NULL; in ossl_crypto_get_ex_new_index_ex() [all …]
|
| /src/crypto/openssl/include/openssl/ |
| H A D | rsa.h | 308 OSSL_DEPRECATEDIN_3_0 void RSA_set_default_method(const RSA_METHOD *meth); 312 OSSL_DEPRECATEDIN_3_0 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); 484 OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth); 485 OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth); 486 OSSL_DEPRECATEDIN_3_0 const char *RSA_meth_get0_name(const RSA_METHOD *meth); 487 OSSL_DEPRECATEDIN_3_0 int RSA_meth_set1_name(RSA_METHOD *meth, 489 OSSL_DEPRECATEDIN_3_0 int RSA_meth_get_flags(const RSA_METHOD *meth); 490 OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_flags(RSA_METHOD *meth, int flags); 491 OSSL_DEPRECATEDIN_3_0 void *RSA_meth_get0_app_data(const RSA_METHOD *meth); 492 OSSL_DEPRECATEDIN_3_0 int RSA_meth_set0_app_data(RSA_METHOD *meth, [all …]
|
| /src/crypto/openssl/crypto/ui/ |
| H A D | ui_lib.c | 41 ret->meth = method; in UI_new_method() 76 ui->meth->ui_destroy_data(ui, ui->user_data); in UI_free() 368 if (ui != NULL && ui->meth != NULL && ui->meth->ui_construct_prompt != NULL) in UI_construct_prompt() 369 prompt = ui->meth->ui_construct_prompt(ui, phrase_desc, object_name); in UI_construct_prompt() 401 ui->meth->ui_destroy_data(ui, old_data); in UI_add_user_data() 413 if (ui->meth->ui_duplicate_data == NULL in UI_dup_user_data() 414 || ui->meth->ui_destroy_data == NULL) { in UI_dup_user_data() 419 duplicate = ui->meth->ui_duplicate_data(ui, user_data); in UI_dup_user_data() 470 if (ui->meth->ui_write_string != NULL in print_error() 471 && ui->meth->ui_write_string(ui, &uis) <= 0) in print_error() [all …]
|
| /src/crypto/openssl/crypto/x509/ |
| H A D | x_crl.c | 165 if (crl->meth->crl_free) { in crl_cb() 166 if (!crl->meth->crl_free(crl)) in crl_cb() 182 crl->meth = default_crl_method; in crl_cb() 251 if (crl->meth->crl_init) { in crl_cb() 252 if (crl->meth->crl_init(crl) == 0) in crl_cb() 260 if (crl->meth != NULL && crl->meth->crl_free != NULL) { in crl_cb() 261 if (!crl->meth->crl_free(crl)) in crl_cb() 383 if (crl->meth->crl_verify) in X509_CRL_verify() 384 return crl->meth->crl_verify(crl, r); in X509_CRL_verify() 391 if (crl->meth->crl_lookup) in X509_CRL_get0_by_serial() [all …]
|
| /src/crypto/openssl/test/ |
| H A D | bio_comp_test.c | 37 static int do_bio_comp_test(const BIO_METHOD *meth, size_t size) in do_bio_comp_test() argument 47 if (!TEST_ptr(meth)) in do_bio_comp_test() 49 if (!TEST_ptr(bcomp = BIO_new(meth))) in do_bio_comp_test() 62 if (!TEST_ptr(bexp = BIO_new(meth))) in do_bio_comp_test() 79 static int do_bio_comp(const BIO_METHOD *meth, int n) in do_bio_comp() argument 115 if (!TEST_true(do_bio_comp_test(meth, size))) in do_bio_comp()
|