Home
last modified time | relevance | path

Searched refs:ameth (Results 1 – 25 of 36) sorted by relevance

12

/freebsd/crypto/openssl/crypto/asn1/
H A Dameth_lib.c27 const EVP_PKEY_ASN1_METHOD *, ameth);
36 const EVP_PKEY_ASN1_METHOD *, ameth);
110 const EVP_PKEY_ASN1_METHOD *ameth = NULL; in EVP_PKEY_asn1_find_str() local
117 ameth = ENGINE_pkey_asn1_find_str(&e, str, len); in EVP_PKEY_asn1_find_str()
118 if (ameth) { in EVP_PKEY_asn1_find_str()
123 ameth = NULL; in EVP_PKEY_asn1_find_str()
126 return ameth; in EVP_PKEY_asn1_find_str()
132 ameth = EVP_PKEY_asn1_get0(i); in EVP_PKEY_asn1_find_str()
133 if (ameth->pkey_flags & ASN1_PKEY_ALIAS) in EVP_PKEY_asn1_find_str()
135 if ((int)strlen(ameth->pem_str) == len in EVP_PKEY_asn1_find_str()
[all …]
H A Di2d_evp.c85 if (a->ameth != NULL && a->ameth->param_encode != NULL) in i2d_KeyParams()
86 return a->ameth->param_encode(a, pp); in i2d_KeyParams()
109 if (a->ameth != NULL && a->ameth->old_priv_encode != NULL) { in i2d_PrivateKey()
110 return a->ameth->old_priv_encode(a, pp); in i2d_PrivateKey()
112 if (a->ameth != NULL && a->ameth->priv_encode != NULL) { in i2d_PrivateKey()
H A Dd2i_param.c32 if (ret->ameth == NULL || ret->ameth->param_decode == NULL) { in d2i_KeyParams()
37 if (!ret->ameth->param_decode(ret, pp, length)) in d2i_KeyParams()
H A Da_sign.c165 if (pkey->ameth == NULL) { in ASN1_item_sign_ctx()
208 } else if (pkey->ameth->item_sign) { in ASN1_item_sign_ctx()
209 rv = pkey->ameth->item_sign(ctx, it, data, algor1, algor2, signature); in ASN1_item_sign_ctx()
237 pkey->ameth->pkey_id; in ASN1_item_sign_ctx()
244 paramtype = pkey->ameth->pkey_flags & ASN1_PKEY_SIGPARAM_NULL ? V_ASN1_NULL : V_ASN1_UNDEF; in ASN1_item_sign_ctx()
H A Dd2i_pr.c127 if (!ret->ameth->old_priv_decode || !ret->ameth->old_priv_decode(ret, &p, length)) { in ossl_d2i_PrivateKey_legacy()
128 if (ret->ameth->priv_decode != NULL in ossl_d2i_PrivateKey_legacy()
129 || ret->ameth->priv_decode_ex != NULL) { in ossl_d2i_PrivateKey_legacy()
H A Da_verify.c140 if (pkey->ameth == NULL || pkey->ameth->item_verify == NULL) { in ASN1_item_verify_ctx()
144 ret = pkey->ameth->item_verify(ctx, it, data, alg, signature, pkey); in ASN1_item_verify_ctx()
/freebsd/crypto/openssl/crypto/engine/
H A Dtb_asnmth.c145 EVP_PKEY_ASN1_METHOD *ameth; in ENGINE_get_pkey_asn1_meth_str() local
152 e->pkey_asn1_meths(e, &ameth, NULL, nids[i]); in ENGINE_get_pkey_asn1_meth_str()
153 if (ameth != NULL in ENGINE_get_pkey_asn1_meth_str()
154 && ((int)strlen(ameth->pem_str) == len) in ENGINE_get_pkey_asn1_meth_str()
155 && OPENSSL_strncasecmp(ameth->pem_str, str, len) == 0) in ENGINE_get_pkey_asn1_meth_str()
156 return ameth; in ENGINE_get_pkey_asn1_meth_str()
163 const EVP_PKEY_ASN1_METHOD *ameth; member
172 if (lk->ameth) in look_str_cb()
176 EVP_PKEY_ASN1_METHOD *ameth; in look_str_cb() local
177 e->pkey_asn1_meths(e, &ameth, NULL, nid); in look_str_cb()
[all …]
/freebsd/crypto/openssl/crypto/evp/
H A Dp_lib.c67 if (pkey->ameth != NULL && pkey->ameth->pkey_bits != NULL) in EVP_PKEY_get_bits()
68 size = pkey->ameth->pkey_bits(pkey); in EVP_PKEY_get_bits()
83 if (pkey->ameth != NULL && pkey->ameth->pkey_security_bits != NULL) in EVP_PKEY_get_security_bits()
84 size = pkey->ameth->pkey_security_bits(pkey); in EVP_PKEY_get_security_bits()
228 if (from->ameth != NULL && from->ameth->param_copy != NULL) in EVP_PKEY_copy_parameters()
229 ok = from->ameth->param_copy(to, from); in EVP_PKEY_copy_parameters()
244 if (pkey->ameth != NULL && pkey->ameth->param_missing != NULL) in EVP_PKEY_missing_parameters()
245 return pkey->ameth->param_missing(pkey); in EVP_PKEY_missing_parameters()
346 if (a->ameth != NULL && a->ameth->param_cmp != NULL) in EVP_PKEY_parameters_eq()
347 return a->ameth->param_cmp(a, b); in EVP_PKEY_parameters_eq()
[all …]
H A Dpmeth_check.c72 if (pkey->ameth == NULL || pkey->ameth->pkey_public_check == NULL) in evp_pkey_public_check_combined()
75 return pkey->ameth->pkey_public_check(pkey); in evp_pkey_public_check_combined()
118 if (pkey->ameth == NULL || pkey->ameth->pkey_param_check == NULL) in evp_pkey_param_check_combined()
121 return pkey->ameth->pkey_param_check(pkey); in evp_pkey_param_check_combined()
188 if (pkey->ameth == NULL || pkey->ameth->pkey_check == NULL) in EVP_PKEY_pairwise_check()
191 return pkey->ameth->pkey_check(pkey); in EVP_PKEY_pairwise_check()
H A Devp_pkey.c47 if (pkey->ameth->priv_decode_ex != NULL) { in evp_pkcs82pkey_legacy()
48 if (!pkey->ameth->priv_decode_ex(pkey, p8, libctx, propq)) in evp_pkcs82pkey_legacy()
50 } else if (pkey->ameth->priv_decode != NULL) { in evp_pkcs82pkey_legacy()
51 if (!pkey->ameth->priv_decode(pkey, p8)) { in evp_pkcs82pkey_legacy()
159 if (pkey->ameth != NULL) { in EVP_PKEY2PKCS8()
160 if (pkey->ameth->priv_encode != NULL) { in EVP_PKEY2PKCS8()
161 if (!pkey->ameth->priv_encode(p8, pkey)) { in EVP_PKEY2PKCS8()
247 const EVP_PKEY_ASN1_METHOD *ameth; in EVP_PKEY_get0_type_name() local
254 ameth = EVP_PKEY_get0_asn1(key); in EVP_PKEY_get0_type_name()
255 if (ameth != NULL) in EVP_PKEY_get0_type_name()
[all …]
/freebsd/crypto/openssl/crypto/pem/
H A Dpem_pkey.c175 const EVP_PKEY_ASN1_METHOD *ameth; in pem_read_bio_key_legacy() local
176 ameth = EVP_PKEY_asn1_find_str(NULL, nm, slen); in pem_read_bio_key_legacy()
177 if (ameth == NULL || ameth->old_priv_decode == NULL) in pem_read_bio_key_legacy()
179 ret = ossl_d2i_PrivateKey_legacy(ameth->pkey_id, x, &p, len, libctx, in pem_read_bio_key_legacy()
192 || !ret->ameth->param_decode in pem_read_bio_key_legacy()
193 || !ret->ameth->param_decode(ret, &p, len)) { in pem_read_bio_key_legacy()
324 if (x != NULL && (x->ameth == NULL || x->ameth->priv_encode != NULL)) in PEM_write_cb_ex_fnsig()
357 if (x->ameth == NULL || x->ameth->old_priv_encode == NULL) { in PEM_write_bio_PrivateKey_traditional()
362 BIO_snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); in PEM_write_bio_PrivateKey_traditional()
399 if (!x->ameth || !x->ameth->param_encode) in PEM_write_fnsig()
[all …]
H A Dpem_lib.c136 const EVP_PKEY_ASN1_METHOD *ameth; in check_pem() local
147 ameth = EVP_PKEY_asn1_find_str(NULL, nm, slen); in check_pem()
148 if (ameth && ameth->old_priv_decode) in check_pem()
156 const EVP_PKEY_ASN1_METHOD *ameth; in check_pem() local
160 ameth = EVP_PKEY_asn1_find_str(&e, nm, slen); in check_pem()
161 if (ameth) { in check_pem()
163 if (ameth->param_decode) in check_pem()
/freebsd/crypto/openssl/apps/lib/
H A Dengine.c139 const EVP_PKEY_ASN1_METHOD *ameth; in get_legacy_pkey_id() local
144 ameth = EVP_PKEY_asn1_find_str(&tmpeng, algname, -1); in get_legacy_pkey_id()
149 if (ameth == NULL && e != NULL) in get_legacy_pkey_id()
150 ameth = ENGINE_get_pkey_asn1_meth_str(e, algname, -1); in get_legacy_pkey_id()
155 ameth = NULL; in get_legacy_pkey_id()
158 if (ameth == NULL) in get_legacy_pkey_id()
161 EVP_PKEY_asn1_get0_info(&pkey_id, NULL, NULL, NULL, NULL, ameth); in get_legacy_pkey_id()
/freebsd/crypto/openssl/test/
H A Dpkey_meth_test.c28 const EVP_PKEY_ASN1_METHOD *ameth; in test_asn1_meths() local
31 ameth = EVP_PKEY_asn1_get0(i); in test_asn1_meths()
32 EVP_PKEY_asn1_get0_info(&pkey_id, NULL, NULL, NULL, NULL, ameth); in test_asn1_meths()
42 ameth = EVP_PKEY_asn1_get0(i); in test_asn1_meths()
43 EVP_PKEY_asn1_get0_info(&pkey_id, NULL, NULL, &info, NULL, ameth); in test_asn1_meths()
/freebsd/crypto/openssl/crypto/ec/
H A Decx_meth.c45 if (!X509_PUBKEY_set0_param(pk, OBJ_nid2obj(pkey->ameth->pkey_id), in ecx_pub_encode()
64 ecx = ossl_ecx_key_op(palg, p, pklen, pkey->ameth->pkey_id, in ecx_pub_decode()
68 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, ecx); in ecx_pub_decode()
92 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, ecx); in ecx_priv_decode_ex()
120 if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(pkey->ameth->pkey_id), 0, in ecx_priv_encode()
137 if (IS25519(pkey->ameth->pkey_id)) { in ecx_bits()
139 } else if (ISX448(pkey->ameth->pkey_id)) { in ecx_bits()
148 if (IS25519(pkey->ameth->pkey_id)) { in ecx_security_bits()
170 const char *nm = OBJ_nid2ln(pkey->ameth->pkey_id); in ecx_key_print()
222 ECX_KEY *ecx = ossl_ecx_key_op(NULL, arg2, arg1, pkey->ameth->pkey_id, in ecx_ctrl()
[all …]
/freebsd/crypto/openssl/doc/man3/
H A DEVP_PKEY_ASN1_METHOD.pod40 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
41 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
44 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
56 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
66 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
82 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
84 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
87 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
101 void EVP_PKEY_asn1_set_siginf(EVP_PKEY_ASN1_METHOD *ameth,
106 void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth,
[all …]
/freebsd/crypto/openssl/crypto/dh/
H A Ddh_ameth.c38 int is_dhx = (pkey->ameth == &ossl_dhx_asn1_meth); in d2i_dhp()
50 if (pkey->ameth == &ossl_dhx_asn1_meth) in i2d_dhp()
102 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, dh); in dh_pub_decode()
147 if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(pkey->ameth->pkey_id), in dh_pub_encode()
171 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, dh); in dh_priv_decode()
215 if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(pkey->ameth->pkey_id), 0, in dh_priv_encode()
235 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, dh); in dh_param_decode()
319 a->ameth != &ossl_dhx_asn1_meth); in dh_cmp_parameters()
355 from->ameth == &ossl_dhx_asn1_meth); in dh_copy_parameters()
/freebsd/crypto/openssl/crypto/x509/
H A Dv3_ac_tgt.c146 const EVP_PKEY_ASN1_METHOD *ameth; in i2r_OBJECT_DIGEST_INFO() local
148 ameth = EVP_PKEY_asn1_find(NULL, pkey_nid); in i2r_OBJECT_DIGEST_INFO()
149 if (ameth && ameth->sig_print) in i2r_OBJECT_DIGEST_INFO()
150 return ameth->sig_print(out, digalg, sig, indent + 4, 0); in i2r_OBJECT_DIGEST_INFO()
H A Dx509_set.c217 const EVP_PKEY_ASN1_METHOD *ameth; in x509_sig_info_init() local
234 ameth = EVP_PKEY_asn1_find(NULL, pknid); in x509_sig_info_init()
235 if (ameth != NULL && ameth->siginf_set != NULL in x509_sig_info_init()
236 && ameth->siginf_set(siginf, alg, sig)) in x509_sig_info_init()
H A Dt_x509.c302 const EVP_PKEY_ASN1_METHOD *ameth; in X509_signature_print() local
304 ameth = EVP_PKEY_asn1_find(NULL, pkey_nid); in X509_signature_print()
305 if (ameth && ameth->sig_print) in X509_signature_print()
306 return ameth->sig_print(bp, sigalg, sig, indent + 4, 0); in X509_signature_print()
H A Dx_pubkey.c335 if (pkey->ameth != NULL) { in X509_PUBKEY_set()
340 if (pkey->ameth->pub_encode != NULL) { in X509_PUBKEY_set()
341 if (!pkey->ameth->pub_encode(pk, pkey)) { in X509_PUBKEY_set()
436 if (pkey->ameth->pub_decode) { in x509_pubkey_decode()
442 if (!pkey->ameth->pub_decode(pkey, key)) in x509_pubkey_decode()
558 if (a->ameth != NULL) { in i2d_PUBKEY()
565 if (a->ameth->pub_encode != NULL && a->ameth->pub_encode(xpk, a)) { in i2d_PUBKEY()
/freebsd/crypto/openssl/crypto/pkcs7/
H A Dpk7_lib.c382 if (pkey->ameth != NULL && pkey->ameth->pkey_ctrl != NULL) { in PKCS7_SIGNER_INFO_set()
383 ret = pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_PKCS7_SIGN, 0, p7i); in PKCS7_SIGNER_INFO_set()
650 if (pkey->ameth == NULL || pkey->ameth->pkey_ctrl == NULL) { in PKCS7_RECIP_INFO_set()
656 ret = pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_PKCS7_ENCRYPT, 0, p7i); in PKCS7_RECIP_INFO_set()
/freebsd/crypto/openssl/engines/
H A De_loader_attic.c521 const EVP_PKEY_ASN1_METHOD *ameth = NULL; in try_decode_PrivateKey() local
536 && (ameth = EVP_PKEY_asn1_find_str(NULL, pem_name, in try_decode_PrivateKey()
540 ameth)) { in try_decode_PrivateKey()
594 ameth = EVP_PKEY_asn1_get0(i); in try_decode_PrivateKey()
596 NULL, ameth) in try_decode_PrivateKey()
685 const EVP_PKEY_ASN1_METHOD *ameth = NULL; in try_decode_params() local
692 && (ameth = EVP_PKEY_asn1_find_str(NULL, pem_name, slen)) != NULL in try_decode_params()
694 ameth)) { in try_decode_params()
706 ameth = EVP_PKEY_asn1_get0(i); in try_decode_params()
708 NULL, ameth) in try_decode_params()
/freebsd/crypto/openssl/crypto/cms/
H A Dcms_env.c133 if (pkey->ameth == NULL || pkey->ameth->pkey_ctrl == NULL) in ossl_cms_env_asn1_ctrl()
135 i = pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_CMS_ENVELOPE, cmd, ri); in ossl_cms_env_asn1_ctrl()
1356 if (pk->ameth && pk->ameth->pkey_ctrl) { in ossl_cms_pkey_get_ri_type()
1358 i = pk->ameth->pkey_ctrl(pk, ASN1_PKEY_CTRL_CMS_RI_TYPE, 0, &r); in ossl_cms_pkey_get_ri_type()
1369 if (pk->ameth != NULL && pk->ameth->pkey_ctrl != NULL) { in ossl_cms_pkey_is_ri_type_supported()
1372 i = pk->ameth->pkey_ctrl(pk, ASN1_PKEY_CTRL_CMS_IS_RI_TYPE_SUPPORTED, in ossl_cms_pkey_is_ri_type_supported()
/freebsd/crypto/openssl/crypto/rsa/
H A Drsa_ameth.c67 if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(pkey->ameth->pkey_id), in rsa_pub_encode()
93 switch (pkey->ameth->pkey_id) { in rsa_pub_decode()
105 if (!EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, rsa)) { in rsa_pub_decode()
136 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, rsa); in old_rsa_priv_decode()
162 if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(pkey->ameth->pkey_id), 0, in rsa_priv_encode()
180 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, rsa); in rsa_priv_decode()

12