Home
last modified time | relevance | path

Searched refs:meth (Results 1 – 25 of 111) sorted by relevance

12345

/freebsd-12-stable/crypto/openssl/crypto/rsa/
Drsa_meth.c16 RSA_METHOD *meth = OPENSSL_zalloc(sizeof(*meth)); in RSA_meth_new() local
18 if (meth != NULL) { in RSA_meth_new()
19 meth->flags = flags; in RSA_meth_new()
21 meth->name = OPENSSL_strdup(name); in RSA_meth_new()
22 if (meth->name != NULL) in RSA_meth_new()
23 return meth; in RSA_meth_new()
25 OPENSSL_free(meth); in RSA_meth_new()
32 void RSA_meth_free(RSA_METHOD *meth) in RSA_meth_free() argument
34 if (meth != NULL) { in RSA_meth_free()
35 OPENSSL_free(meth->name); in RSA_meth_free()
[all …]
Drsa_lib.c27 return rsa->meth; in RSA_get_method()
30 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth) in RSA_set_method() argument
37 mtmp = rsa->meth; in RSA_set_method()
44 rsa->meth = meth; in RSA_set_method()
45 if (meth->init) in RSA_set_method()
46 meth->init(rsa); in RSA_set_method()
67 ret->meth = RSA_get_default_method(); in RSA_new_method()
69 ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW; in RSA_new_method()
80 ret->meth = ENGINE_get_RSA(ret->engine); in RSA_new_method()
81 if (ret->meth == NULL) { in RSA_new_method()
[all …]
/freebsd-12-stable/crypto/openssl/crypto/ec/
Dec_kmeth.c42 void EC_KEY_set_default_method(const EC_KEY_METHOD *meth) in EC_KEY_set_default_method() argument
44 if (meth == NULL) in EC_KEY_set_default_method()
47 default_ec_key_meth = meth; in EC_KEY_set_default_method()
52 return key->meth; in EC_KEY_get_method()
55 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth) in EC_KEY_set_method() argument
57 void (*finish)(EC_KEY *key) = key->meth->finish; in EC_KEY_set_method()
67 key->meth = meth; in EC_KEY_set_method()
68 if (meth->init != NULL) in EC_KEY_set_method()
69 return meth->init(key); in EC_KEY_set_method()
90 ret->meth = EC_KEY_get_default_method(); in EC_KEY_new_method()
[all …]
Dec_lib.c20 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth) in EC_GROUP_new() argument
24 if (meth == NULL) { in EC_GROUP_new()
28 if (meth->group_init == 0) { in EC_GROUP_new()
39 ret->meth = meth; in EC_GROUP_new()
40 if ((ret->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) { in EC_GROUP_new()
50 if (!meth->group_init(ret)) in EC_GROUP_new()
99 if (group->meth->group_finish != 0) in EC_GROUP_free()
100 group->meth->group_finish(group); in EC_GROUP_free()
116 if (group->meth->group_clear_finish != 0) in EC_GROUP_clear_free()
117 group->meth->group_clear_finish(group); in EC_GROUP_clear_free()
[all …]
Dec_key.c34 if (ret->meth->set_group != NULL in EC_KEY_new_by_curve_name()
35 && ret->meth->set_group(ret, ret->group) == 0) { in EC_KEY_new_by_curve_name()
55 if (r->meth != NULL && r->meth->finish != NULL) in EC_KEY_free()
56 r->meth->finish(r); in EC_KEY_free()
62 if (r->group && r->group->meth->keyfinish) in EC_KEY_free()
63 r->group->meth->keyfinish(r); in EC_KEY_free()
80 if (src->meth != dest->meth) { in EC_KEY_copy()
81 if (dest->meth->finish != NULL) in EC_KEY_copy()
82 dest->meth->finish(dest); in EC_KEY_copy()
83 if (dest->group && dest->group->meth->keyfinish) in EC_KEY_copy()
[all …]
Decp_smpl.c167 if (group->meth->field_encode) { in ec_GFp_simple_group_set_curve()
168 if (!group->meth->field_encode(group, group->a, tmp_a, ctx)) in ec_GFp_simple_group_set_curve()
176 if (group->meth->field_encode) in ec_GFp_simple_group_set_curve()
177 if (!group->meth->field_encode(group, group->b, group->b, ctx)) in ec_GFp_simple_group_set_curve()
205 if (group->meth->field_decode) { in ec_GFp_simple_group_get_curve()
212 if (!group->meth->field_decode(group, a, group->a, ctx)) in ec_GFp_simple_group_get_curve()
216 if (!group->meth->field_decode(group, b, group->b, ctx)) in ec_GFp_simple_group_get_curve()
267 if (group->meth->field_decode) { in ec_GFp_simple_group_check_discriminant()
268 if (!group->meth->field_decode(group, a, group->a, ctx)) in ec_GFp_simple_group_check_discriminant()
270 if (!group->meth->field_decode(group, b, group->b, ctx)) in ec_GFp_simple_group_check_discriminant()
[all …]
Dec_oct.c21 if (group->meth->point_set_compressed_coordinates == NULL in EC_POINT_set_compressed_coordinates()
22 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { in EC_POINT_set_compressed_coordinates()
32 if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) { in EC_POINT_set_compressed_coordinates()
33 if (group->meth->field_type == NID_X9_62_prime_field) in EC_POINT_set_compressed_coordinates()
48 return group->meth->point_set_compressed_coordinates(group, point, x, in EC_POINT_set_compressed_coordinates()
74 if (group->meth->point2oct == 0 in EC_POINT_point2oct()
75 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { in EC_POINT_point2oct()
83 if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) { in EC_POINT_point2oct()
84 if (group->meth->field_type == NID_X9_62_prime_field) in EC_POINT_point2oct()
98 return group->meth->point2oct(group, point, form, buf, len, ctx); in EC_POINT_point2oct()
[all …]
Dec_cvt.c17 const EC_METHOD *meth; in EC_GROUP_new_curve_GFp() local
42 meth = EC_GFp_mont_method(); in EC_GROUP_new_curve_GFp()
45 meth = EC_GFp_nist_method(); in EC_GROUP_new_curve_GFp()
47 meth = EC_GFp_mont_method(); in EC_GROUP_new_curve_GFp()
50 ret = EC_GROUP_new(meth); in EC_GROUP_new_curve_GFp()
66 const EC_METHOD *meth; in EC_GROUP_new_curve_GF2m() local
69 meth = EC_GF2m_simple_method(); in EC_GROUP_new_curve_GF2m()
71 ret = EC_GROUP_new(meth); in EC_GROUP_new_curve_GF2m()
Dec2_smpl.c410 if (!group->meth->field_div(group, s, s, t, ctx)) in ec_GF2m_simple_add()
412 if (!group->meth->field_sqr(group, x2, s, ctx)) in ec_GF2m_simple_add()
427 if (!group->meth->field_div(group, s, y1, x1, ctx)) in ec_GF2m_simple_add()
432 if (!group->meth->field_sqr(group, x2, s, ctx)) in ec_GF2m_simple_add()
442 if (!group->meth->field_mul(group, y2, y2, s, ctx)) in ec_GF2m_simple_add()
506 field_mul = group->meth->field_mul; in ec_GF2m_simple_is_on_curve()
507 field_sqr = group->meth->field_sqr; in ec_GF2m_simple_is_on_curve()
654 if (!group->meth->make_affine(group, points[i], ctx)) in ec_GF2m_simple_points_make_affine()
707 if ((group->meth->field_encode != NULL in ec_GF2m_simple_ladder_pre()
708 && !group->meth->field_encode(group, s->Z, s->Z, ctx)) in ec_GF2m_simple_ladder_pre()
[all …]
Decdsa_sign.c23 if (eckey->meth->sign_sig != NULL) in ECDSA_do_sign_ex()
24 return eckey->meth->sign_sig(dgst, dlen, kinv, rp, eckey); in ECDSA_do_sign_ex()
39 if (eckey->meth->sign != NULL) in ECDSA_sign_ex()
40 return eckey->meth->sign(type, dgst, dlen, sig, siglen, kinv, r, eckey); in ECDSA_sign_ex()
48 if (eckey->meth->sign_setup != NULL) in ECDSA_sign_setup()
49 return eckey->meth->sign_setup(eckey, ctx_in, kinvp, rp); in ECDSA_sign_setup()
Decdsa_vrf.c23 if (eckey->meth->verify_sig != NULL) in ECDSA_do_verify()
24 return eckey->meth->verify_sig(dgst, dgst_len, sig, eckey); in ECDSA_do_verify()
38 if (eckey->meth->verify != NULL) in ECDSA_verify()
39 return eckey->meth->verify(type, dgst, dgst_len, sigbuf, sig_len, in ECDSA_verify()
/freebsd-12-stable/crypto/openssl/ssl/statem/
Dextensions_cust.c86 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 = 0; in custom_ext_init()
119 custom_ext_method *meth; in custom_ext_parse() local
[all …]
/freebsd-12-stable/crypto/openssl/crypto/comp/
Dcomp_lib.c18 COMP_CTX *COMP_CTX_new(COMP_METHOD *meth) in COMP_CTX_new() argument
26 ret->meth = meth; in COMP_CTX_new()
27 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { in COMP_CTX_new()
36 return ctx->meth; in COMP_CTX_get_method()
39 int COMP_get_type(const COMP_METHOD *meth) in COMP_get_type() argument
41 return meth->type; in COMP_get_type()
44 const char *COMP_get_name(const COMP_METHOD *meth) in COMP_get_name() argument
46 return meth->name; in COMP_get_name()
53 if (ctx->meth->finish != NULL) in COMP_CTX_free()
54 ctx->meth->finish(ctx); in COMP_CTX_free()
[all …]
/freebsd-12-stable/crypto/openssl/crypto/dso/
Ddso_lib.c15 static DSO *DSO_new_method(DSO_METHOD *meth) in DSO_new_method() argument
39 ret->meth = default_DSO_meth; in DSO_new_method()
49 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { in DSO_new_method()
78 if ((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) { in DSO_free()
84 if ((dso->meth->finish != NULL) && !dso->meth->finish(dso)) { in DSO_free()
119 DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags) in DSO_load() argument
125 ret = DSO_new_method(meth); in DSO_load()
157 if (ret->meth->dso_load == NULL) { in DSO_load()
161 if (!ret->meth->dso_load(ret)) { in DSO_load()
181 if (dso->meth->dso_bind_func == NULL) { in DSO_bind_func()
[all …]
/freebsd-12-stable/crypto/openssl/crypto/rand/
Drand_lib.c346 const RAND_METHOD *meth = default_RAND_meth; in rand_cleanup_int() local
351 if (meth != NULL && meth->cleanup != NULL) in rand_cleanup_int()
352 meth->cleanup(); in rand_cleanup_int()
389 const RAND_METHOD *meth = RAND_get_rand_method(); in RAND_poll() local
391 if (meth == NULL) in RAND_poll()
394 if (meth == RAND_OpenSSL()) { in RAND_poll()
418 if (meth->add == NULL in RAND_poll()
419 || meth->add(rand_pool_buffer(pool), in RAND_poll()
833 int RAND_set_rand_method(const RAND_METHOD *meth) in RAND_set_rand_method() argument
843 default_RAND_meth = meth; in RAND_set_rand_method()
[all …]
/freebsd-12-stable/crypto/openssl/crypto/
Dex_data.c30 STACK_OF(EX_CALLBACK) *meth;
100 sk_EX_CALLBACK_pop_free(ip->meth, cleanup_cb); in crypto_cleanup_all_ex_data_int()
101 ip->meth = NULL; in crypto_cleanup_all_ex_data_int()
138 if (idx < 0 || idx >= sk_EX_CALLBACK_num(ip->meth)) in CRYPTO_free_ex_index()
140 a = sk_EX_CALLBACK_value(ip->meth, idx); in CRYPTO_free_ex_index()
166 if (ip->meth == NULL) { in CRYPTO_get_ex_new_index()
167 ip->meth = sk_EX_CALLBACK_new_null(); in CRYPTO_get_ex_new_index()
170 if (ip->meth == NULL in CRYPTO_get_ex_new_index()
171 || !sk_EX_CALLBACK_push(ip->meth, NULL)) { in CRYPTO_get_ex_new_index()
188 if (!sk_EX_CALLBACK_push(ip->meth, NULL)) { in CRYPTO_get_ex_new_index()
[all …]
/freebsd-12-stable/crypto/openssl/crypto/dh/
Ddh_lib.c17 int DH_set_method(DH *dh, const DH_METHOD *meth) in DH_set_method() argument
24 mtmp = dh->meth; in DH_set_method()
31 dh->meth = meth; in DH_set_method()
32 if (meth->init) in DH_set_method()
33 meth->init(dh); in DH_set_method()
59 ret->meth = DH_get_default_method(); in DH_new_method()
61 ret->flags = ret->meth->flags; /* early default init */ in DH_new_method()
71 ret->meth = ENGINE_get_DH(ret->engine); in DH_new_method()
72 if (ret->meth == NULL) { in DH_new_method()
79 ret->flags = ret->meth->flags; in DH_new_method()
[all …]
/freebsd-12-stable/crypto/openssl/crypto/dsa/
Ddsa_lib.c24 int DSA_set_method(DSA *dsa, const DSA_METHOD *meth) in DSA_set_method() argument
31 mtmp = dsa->meth; in DSA_set_method()
38 dsa->meth = meth; in DSA_set_method()
39 if (meth->init) in DSA_set_method()
40 meth->init(dsa); in DSA_set_method()
46 return d->meth; in DSA_get_method()
66 ret->meth = DSA_get_default_method(); in DSA_new_method()
68 ret->flags = ret->meth->flags & ~DSA_FLAG_NON_FIPS_ALLOW; /* early default init */ in DSA_new_method()
78 ret->meth = ENGINE_get_DSA(ret->engine); in DSA_new_method()
79 if (ret->meth == NULL) { in DSA_new_method()
[all …]
/freebsd-12-stable/crypto/openssl/crypto/conf/
Dconf_lib.c39 int CONF_set_default_method(CONF_METHOD *meth) in CONF_set_default_method() argument
41 default_CONF_method = meth; in CONF_set_default_method()
177 CONF *NCONF_new(CONF_METHOD *meth) in NCONF_new() argument
181 if (meth == NULL) in NCONF_new()
182 meth = NCONF_default(); in NCONF_new()
184 ret = meth->create(meth); in NCONF_new()
197 conf->meth->destroy(conf); in NCONF_free()
204 conf->meth->destroy_data(conf); in NCONF_free_data()
214 return conf->meth->load(conf, file, eline); in NCONF_load()
239 return conf->meth->load_bio(conf, bp, eline); in NCONF_load_bio()
[all …]
/freebsd-12-stable/crypto/openssh/openbsd-compat/
Dlibressl-api-compat.c529 RSA_meth_free(RSA_METHOD *meth) in RSA_meth_free() argument
531 if (meth != NULL) { in RSA_meth_free()
532 free((char *)meth->name); in RSA_meth_free()
533 free(meth); in RSA_meth_free()
540 RSA_meth_dup(const RSA_METHOD *meth) in RSA_meth_dup() argument
546 memcpy(copy, meth, sizeof(*copy)); in RSA_meth_dup()
547 if ((copy->name = strdup(meth->name)) == NULL) { in RSA_meth_dup()
558 RSA_meth_set1_name(RSA_METHOD *meth, const char *name) in RSA_meth_set1_name() argument
564 free((char *)meth->name); in RSA_meth_set1_name()
565 meth->name = copy; in RSA_meth_set1_name()
[all …]
Dopenssl-compat.h170 void RSA_meth_free(RSA_METHOD *meth);
174 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
178 int RSA_meth_set1_name(RSA_METHOD *meth, const char *name);
182 int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa);
186 int RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen,
191 int RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen,
196 int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa));
/freebsd-12-stable/crypto/openssl/include/openssl/
Drsa.h269 void RSA_set_default_method(const RSA_METHOD *meth);
273 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
423 void RSA_meth_free(RSA_METHOD *meth);
424 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
425 const char *RSA_meth_get0_name(const RSA_METHOD *meth);
426 int RSA_meth_set1_name(RSA_METHOD *meth, const char *name);
427 int RSA_meth_get_flags(const RSA_METHOD *meth);
428 int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
429 void *RSA_meth_get0_app_data(const RSA_METHOD *meth);
430 int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data);
[all …]
/freebsd-12-stable/crypto/openssl/crypto/x509/
Dx_crl.c166 if (crl->meth->crl_free) { in crl_cb()
167 if (!crl->meth->crl_free(crl)) in crl_cb()
183 crl->meth = default_crl_method; in crl_cb()
253 if (crl->meth->crl_init) { in crl_cb()
254 if (crl->meth->crl_init(crl) == 0) in crl_cb()
262 if (crl->meth != NULL && crl->meth->crl_free != NULL) { in crl_cb()
263 if (!crl->meth->crl_free(crl)) in crl_cb()
355 if (crl->meth->crl_verify) in X509_CRL_verify()
356 return crl->meth->crl_verify(crl, r); in X509_CRL_verify()
363 if (crl->meth->crl_lookup) in X509_CRL_get0_by_serial()
[all …]
/freebsd-12-stable/crypto/openssl/crypto/ui/
Dui_lib.c43 ret->meth = method; in UI_new_method()
78 ui->meth->ui_destroy_data(ui, ui->user_data); in UI_free()
362 if (ui->meth->ui_construct_prompt != NULL) in UI_construct_prompt()
363 prompt = ui->meth->ui_construct_prompt(ui, object_desc, object_name); in UI_construct_prompt()
397 ui->meth->ui_destroy_data(ui, old_data); in UI_add_user_data()
409 if (ui->meth->ui_duplicate_data == NULL in UI_dup_user_data()
410 || ui->meth->ui_destroy_data == NULL) { in UI_dup_user_data()
415 duplicate = ui->meth->ui_duplicate_data(ui, user_data); in UI_dup_user_data()
466 if (ui->meth->ui_write_string != NULL in print_error()
467 && ui->meth->ui_write_string(ui, &uis) <= 0) in print_error()
[all …]
/freebsd-12-stable/crypto/openssl/doc/man3/
DRSA_meth_new.pod24 void RSA_meth_free(RSA_METHOD *meth);
26 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
28 const char *RSA_meth_get0_name(const RSA_METHOD *meth);
29 int RSA_meth_set1_name(RSA_METHOD *meth, const char *name);
31 int RSA_meth_get_flags(const RSA_METHOD *meth);
32 int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
34 void *RSA_meth_get0_app_data(const RSA_METHOD *meth);
35 int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data);
37 int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen, const unsigned char *from,
44 int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth))
[all …]

12345