Home
last modified time | relevance | path

Searched refs:pkey (Results 1 – 25 of 312) sorted by relevance

12345678910>>...13

/openssl/crypto/evp/
H A Dp_lib.c69 size = pkey->ameth->pkey_bits(pkey); in EVP_PKEY_get_bits()
85 size = pkey->ameth->pkey_security_bits(pkey); in EVP_PKEY_get_security_bits()
232 return pkey->ameth->param_missing(pkey); in EVP_PKEY_missing_parameters()
728 pkey->foreign = pkey->pkey.rsa != NULL in detect_foreign_key()
735 pkey->foreign = pkey->pkey.ec != NULL in detect_foreign_key()
741 pkey->foreign = pkey->pkey.dsa != NULL in detect_foreign_key()
747 pkey->foreign = pkey->pkey.dh != NULL in detect_foreign_key()
784 pkey->pkey.ptr = key; in EVP_PKEY_assign()
797 return pkey->pkey.ptr; in EVP_PKEY_get0()
1097 return EC_KEY_can_sign(pkey->pkey.ec); in EVP_PKEY_can_sign()
[all …]
H A Dpmeth_check.c49 EVP_PKEY *pkey = ctx->pkey; in evp_pkey_public_check_combined() local
52 if (pkey == NULL) { in evp_pkey_public_check_combined()
71 if (pkey->ameth == NULL || pkey->ameth->pkey_public_check == NULL) in evp_pkey_public_check_combined()
74 return pkey->ameth->pkey_public_check(pkey); in evp_pkey_public_check_combined()
93 EVP_PKEY *pkey = ctx->pkey; in evp_pkey_param_check_combined() local
116 if (pkey->ameth == NULL || pkey->ameth->pkey_param_check == NULL) in evp_pkey_param_check_combined()
119 return pkey->ameth->pkey_param_check(pkey); in evp_pkey_param_check_combined()
138 EVP_PKEY *pkey = ctx->pkey; in EVP_PKEY_private_check() local
162 EVP_PKEY *pkey = ctx->pkey; in EVP_PKEY_pairwise_check() local
184 if (pkey->ameth == NULL || pkey->ameth->pkey_check == NULL) in EVP_PKEY_pairwise_check()
[all …]
H A Dp_legacy.c25 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) in EVP_PKEY_set1_RSA() argument
27 int ret = EVP_PKEY_assign_RSA(pkey, key); in EVP_PKEY_set1_RSA()
34 RSA *evp_pkey_get0_RSA_int(const EVP_PKEY *pkey) in evp_pkey_get0_RSA_int() argument
36 if (pkey->type != EVP_PKEY_RSA && pkey->type != EVP_PKEY_RSA_PSS) { in evp_pkey_get0_RSA_int()
40 return evp_pkey_get_legacy((EVP_PKEY *)pkey); in evp_pkey_get0_RSA_int()
45 return evp_pkey_get0_RSA_int(pkey); in EVP_PKEY_get0_RSA()
48 RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey) in EVP_PKEY_get1_RSA() argument
50 RSA *ret = evp_pkey_get0_RSA_int(pkey); in EVP_PKEY_get1_RSA()
62 if (!EVP_PKEY_assign_EC_KEY(pkey, key)) { in EVP_PKEY_set1_EC_KEY()
80 return evp_pkey_get0_EC_KEY_int(pkey); in EVP_PKEY_get0_EC_KEY()
[all …]
H A Devp_pkey.c28 EVP_PKEY *pkey = NULL; in evp_pkcs82pkey_legacy() local
35 if ((pkey = EVP_PKEY_new()) == NULL) { in evp_pkcs82pkey_legacy()
48 if (!pkey->ameth->priv_decode_ex(pkey, p8, libctx, propq)) in evp_pkcs82pkey_legacy()
51 if (!pkey->ameth->priv_decode(pkey, p8)) { in evp_pkcs82pkey_legacy()
60 return pkey; in evp_pkcs82pkey_legacy()
63 EVP_PKEY_free(pkey); in evp_pkcs82pkey_legacy()
70 EVP_PKEY *pkey = NULL; in EVP_PKCS82PKEY_ex() local
114 return pkey; in EVP_PKCS82PKEY_ex()
134 if (evp_pkey_is_provided(pkey)) { in EVP_PKEY2PKCS8()
158 if (pkey->ameth != NULL) { in EVP_PKEY2PKCS8()
[all …]
/openssl/crypto/dh/
H A Ddh_ameth.c57 DH_free(pkey->pkey.dh); in int_dh_free()
102 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, dh); in dh_pub_decode()
120 dh = pkey->pkey.dh; in dh_pub_encode()
191 params->length = i2d_dhp(pkey, pkey->pkey.dh, &params->data); in dh_priv_encode()
241 return i2d_dhp(pkey, pkey->pkey.dh, pder); in dh_param_encode()
302 return DH_size(pkey->pkey.dh); in int_dh_size()
307 return DH_bits(pkey->pkey.dh); in dh_bits()
312 return DH_security_bits(pkey->pkey.dh); in dh_security_bits()
430 DH *dh = pkey->pkey.dh; in dh_pkey_public_check()
442 DH *dh = pkey->pkey.dh; in dh_pkey_param_check()
[all …]
/openssl/crypto/ec/
H A Dec_ameth.c70 const EC_KEY *ec_key = pkey->pkey.ec; in eckey_pub_encode()
164 EC_KEY ec_key = *(pkey->pkey.ec); in eckey_priv_encode()
207 return ECDSA_size(pkey->pkey.ec); in int_ec_size()
234 if (pkey->pkey.ec == NULL || EC_KEY_get0_group(pkey->pkey.ec) == NULL) in ec_missing_parameters()
274 EC_KEY_free(pkey->pkey.ec); in int_ec_free()
359 return i2d_ECParameters(pkey->pkey.ec, pder); in eckey_param_encode()
393 return i2d_ECPrivateKey(pkey->pkey.ec, pder); in old_ec_priv_encode()
425 EC_KEY *eckey = pkey->pkey.ec; in ec_pkey_check()
438 EC_KEY *eckey = pkey->pkey.ec; in ec_pkey_public_check()
454 EC_KEY *eckey = pkey->pkey.ec; in ec_pkey_param_check()
[all …]
H A Decx_meth.c33 const ECX_KEY *ecxkey = pkey->pkey.ecx; in ecx_pub_encode()
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()
100 const ECX_KEY *ecxkey = pkey->pkey.ecx; in ecx_priv_encode()
157 ossl_ecx_key_free(pkey->pkey.ecx); in ecx_free()
169 const ECX_KEY *ecxkey = pkey->pkey.ecx; in ecx_key_print()
230 if (pkey->pkey.ecx != NULL) { in ecx_ctrl()
233 *ppt = OPENSSL_memdup(pkey->pkey.ecx->pubkey, KEYLEN(pkey)); in ecx_ctrl()
272 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, ecx); in ecx_set_priv_key()
299 const ECX_KEY *key = pkey->pkey.ecx; in ecx_get_priv_key()
[all …]
/openssl/crypto/dsa/
H A Ddsa_ameth.c97 dsa = pkey->pkey.dsa; in dsa_pub_encode()
170 if (pkey->pkey.dsa == NULL|| pkey->pkey.dsa->priv_key == NULL) { in dsa_priv_encode()
220 return DSA_size(pkey->pkey.dsa); in int_dsa_size()
225 return DSA_bits(pkey->pkey.dsa); in dsa_bits()
230 return DSA_security_bits(pkey->pkey.dsa); in dsa_security_bits()
236 dsa = pkey->pkey.dsa; in dsa_missing_parameters()
269 DSA_free(pkey->pkey.dsa); in int_dsa_free()
335 return i2d_DSAparams(pkey->pkey.dsa, pder); in dsa_param_encode()
341 return do_dsa_print(bp, pkey->pkey.dsa, indent, 0); in dsa_param_print()
372 return i2d_DSAPrivateKey(pkey->pkey.dsa, pder); in old_dsa_priv_encode()
[all …]
/openssl/crypto/x509/
H A Dx_pubkey.c35 EVP_PKEY *pkey; member
308 pubkey->pkey = EVP_PKEY_dup(a->pkey); in X509_PUBKEY_dup()
338 if (!pkey->ameth->pub_encode(pk, pkey)) { in X509_PUBKEY_set()
389 pk->pkey = pkey; in X509_PUBKEY_set()
406 EVP_PKEY *pkey; in x509_pubkey_decode() local
440 if (!pkey->ameth->pub_decode(pkey, key)) in x509_pubkey_decode()
447 *ppkey = pkey; in x509_pubkey_decode()
607 EVP_PKEY *pkey; in d2i_RSA_PUBKEY() local
648 EVP_PKEY *pkey; in ossl_d2i_DH_PUBKEY() local
689 EVP_PKEY *pkey; in ossl_d2i_DHx_PUBKEY() local
[all …]
/openssl/demos/pkey/
H A DEVP_PKEY_RSA_keygen.c38 EVP_PKEY *pkey = NULL; in generate_rsa_key_long() local
96 return pkey; in generate_rsa_key_long()
110 EVP_PKEY *pkey = NULL; in generate_rsa_key_short() local
115 if (pkey == NULL) in generate_rsa_key_short()
118 return pkey; in generate_rsa_key_short()
124 static int dump_key(const EVP_PKEY *pkey) in dump_key() argument
215 if (PEM_write_PUBKEY(stdout, pkey) == 0) { in dump_key()
244 EVP_PKEY *pkey = NULL; in main() local
275 if (pkey == NULL) in main()
279 if (dump_key(pkey) == 0) { in main()
[all …]
H A DEVP_PKEY_EC_keygen.c21 static int get_key_values(EVP_PKEY *pkey);
85 static int get_key_values(EVP_PKEY *pkey) in get_key_values() argument
94 if (!EVP_PKEY_get_utf8_string_param(pkey, OSSL_PKEY_PARAM_GROUP_NAME, in get_key_values()
101 if (!EVP_PKEY_get_octet_string_param(pkey, OSSL_PKEY_PARAM_PUB_KEY, in get_key_values()
108 if (!EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_PRIV_KEY, &out_priv)) { in get_key_values()
135 EVP_PKEY *pkey; in main() local
137 pkey = do_ec_keygen(); in main()
138 if (pkey == NULL) in main()
141 if (!get_key_values(pkey)) in main()
153 EVP_PKEY_free(pkey); in main()
/openssl/crypto/rsa/
H A Drsa_ameth.c32 const RSA *rsa = pkey->pkey.rsa; in rsa_param_encode()
62 penclen = i2d_RSAPublicKey(pkey->pkey.rsa, &penc); in rsa_pub_encode()
123 if (BN_cmp(b->pkey.rsa->n, a->pkey.rsa->n) != 0 in rsa_pub_cmp()
142 return i2d_RSAPrivateKey(pkey->pkey.rsa, pder); in old_rsa_priv_encode()
187 return RSA_size(pkey->pkey.rsa); in int_rsa_size()
192 return BN_num_bits(pkey->pkey.rsa->n); in rsa_bits()
197 return RSA_security_bits(pkey->pkey.rsa); in rsa_security_bits()
202 RSA_free(pkey->pkey.rsa); in int_rsa_free()
302 const RSA *x = pkey->pkey.rsa; in pkey_rsa_print()
428 if (pkey->pkey.rsa->pss != NULL) { in rsa_pkey_ctrl()
[all …]
/openssl/crypto/pkcs12/
H A Dp12_kiss.c41 if (pkey != NULL) in PKCS12_parse()
42 *pkey = NULL; in PKCS12_parse()
85 if (!parse_pk12(p12, pass, -1, pkey, ocerts)) { in PKCS12_parse()
96 if (pkey != NULL && *pkey != NULL in PKCS12_parse()
122 if (pkey != NULL) { in PKCS12_parse()
123 EVP_PKEY_free(*pkey); in PKCS12_parse()
124 *pkey = NULL; in PKCS12_parse()
208 if (pkey == NULL || *pkey != NULL) in parse_bag()
212 if (*pkey == NULL) in parse_bag()
217 if (pkey == NULL || *pkey != NULL) in parse_bag()
[all …]
/openssl/demos/signature/
H A DEVP_DSA_Signature_demo.c90 EVP_PKEY *pkey = NULL; in generate_dsa_key() local
101 if (pkey == NULL) in generate_dsa_key()
107 EVP_PKEY_free(pkey); in generate_dsa_key()
108 pkey = NULL; in generate_dsa_key()
111 *p_pkey = pkey; in generate_dsa_key()
172 EVP_PKEY *pkey = NULL; in demo_sign() local
219 EVP_PKEY_free(pkey); in demo_sign()
235 EVP_PKEY *pkey = NULL; in demo_verify() local
263 EVP_PKEY_free(pkey); in demo_verify()
274 EVP_PKEY *pkey = NULL; in main() local
[all …]
/openssl/fuzz/
H A Ddecoder.c44 EVP_PKEY *pkey = NULL; in FuzzerTestOneInput() local
57 EVP_PKEY_print_public(bio, pkey, 1, pctx); in FuzzerTestOneInput()
58 EVP_PKEY_print_private(bio, pkey, 1, pctx); in FuzzerTestOneInput()
59 EVP_PKEY_print_params(bio, pkey, 1, pctx); in FuzzerTestOneInput()
61 pkey2 = EVP_PKEY_dup(pkey); in FuzzerTestOneInput()
63 EVP_PKEY_eq(pkey, pkey2); in FuzzerTestOneInput()
66 ctx = EVP_PKEY_CTX_new(pkey, NULL); in FuzzerTestOneInput()
71 if ((!EVP_PKEY_is_a(pkey, "DH") && !EVP_PKEY_is_a(pkey, "DHX")) in FuzzerTestOneInput()
72 || EVP_PKEY_get_bits(pkey) <= 2048) in FuzzerTestOneInput()
77 if (EVP_PKEY_get_bits(pkey) <= 4096) { in FuzzerTestOneInput()
[all …]
/openssl/crypto/asn1/
H A Da_verify.c28 char *data, EVP_PKEY *pkey) in ASN1_verify() argument
89 EVP_PKEY *pkey) in ASN1_item_verify() argument
114 EVP_PKEY *pkey; in ASN1_item_verify_ctx() local
120 pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_get_pkey_ctx(ctx)); in ASN1_item_verify_ctx()
122 if (pkey == NULL) { in ASN1_item_verify_ctx()
138 if (mdnid == NID_undef && evp_pkey_is_legacy(pkey)) { in ASN1_item_verify_ctx()
139 if (pkey->ameth == NULL || pkey->ameth->item_verify == NULL) { in ASN1_item_verify_ctx()
143 ret = pkey->ameth->item_verify(ctx, it, data, alg, signature, pkey); in ASN1_item_verify_ctx()
164 if (!EVP_PKEY_is_a(pkey, "RSA") && !EVP_PKEY_is_a(pkey, "RSA-PSS")) { in ASN1_item_verify_ctx()
169 if (ossl_rsa_pss_to_ctx(ctx, NULL, alg, pkey) <= 0) { in ASN1_item_verify_ctx()
[all …]
/openssl/test/
H A Devp_extra_test2.c400 EVP_PKEY_free(pkey); in test_dh_paramgen()
415 EVP_PKEY_free(pkey); in set_fromdata_string()
431 EVP_PKEY_free(pkey); in set_fromdata_uint()
641 EVP_PKEY_free(pkey); in test_d2i_AutoPrivateKey_ex()
671 EVP_PKEY_free(pkey); in test_pkcs8key_nid_bio()
775 EVP_PKEY_free(pkey); in test_d2i_PrivateKey_ex()
810 EVP_PKEY_free(pkey); in test_PEM_read_bio_negative()
877 EVP_PKEY_free(pkey); in do_fromdata_key_is_equal()
1047 EVP_PKEY_free(pkey); in do_check_params()
1164 EVP_PKEY_free(pkey); in test_dsa_todata()
[all …]
H A Devp_extra_test.c800 return pkey; in load_example_key()
863 return pkey; in load_example_hmac_key()
953 pkey = tmp_pkey; in make_key_fromdata()
958 return pkey; in make_key_fromdata()
1412 pkey = dup_pk; in test_EC_priv_only_legacy()
2115 EVP_PKEY *pkey; in test_invalide_ec_char2_pub_range_decode() local
2618 EVP_PKEY *pkey; in test_set_get_raw_keys_int() local
2663 if (!TEST_ptr(pkey) in test_set_get_raw_keys_int()
2664 || !TEST_int_eq(EVP_PKEY_eq(pkey, pkey), 1) in test_set_get_raw_keys_int()
2757 ctx2->pkey = pkey; in test_EVP_PKEY_check()
[all …]
/openssl/demos/encode/
H A Dec_encode.c32 EVP_PKEY *pkey = NULL; in load_key() local
46 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "PEM", NULL, "EC", in load_key()
88 EVP_PKEY_free(pkey); in load_key()
89 pkey = NULL; in load_key()
92 return pkey; in load_key()
101 static int store_key(EVP_PKEY *pkey, FILE *f, const char *passphrase) in store_key() argument
178 EVP_PKEY *pkey = NULL; in main() local
189 pkey = load_key(libctx, stdin, passphrase_in); in main()
190 if (pkey == NULL) { in main()
195 if (store_key(pkey, stdout, passphrase_out) == 0) { in main()
[all …]
H A Drsa_encode.c32 EVP_PKEY *pkey = NULL; in load_key() local
46 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "PEM", NULL, "RSA", in load_key()
88 EVP_PKEY_free(pkey); in load_key()
89 pkey = NULL; in load_key()
92 return pkey; in load_key()
101 static int store_key(EVP_PKEY *pkey, FILE *f, const char *passphrase) in store_key() argument
175 EVP_PKEY *pkey = NULL; in main() local
186 pkey = load_key(libctx, stdin, passphrase_in); in main()
187 if (pkey == NULL) { in main()
192 if (store_key(pkey, stdout, passphrase_out) == 0) { in main()
[all …]
/openssl/providers/implementations/encode_decode/
H A Dencode_key2ms.c39 EVP_PKEY *pkey, int ispub) in write_msblob() argument
46 ret = ispub ? i2b_PublicKey_bio(out, pkey) : i2b_PrivateKey_bio(out, pkey); in write_msblob()
53 EVP_PKEY *pkey) in write_pvk() argument
134 EVP_PKEY *pkey = NULL; in key2msblob_encode() local
144 if ((pkey = EVP_PKEY_new()) != NULL && set1_key(pkey, key)) in key2msblob_encode()
145 ok = write_msblob(ctx, cout, pkey, ispub); in key2msblob_encode()
146 EVP_PKEY_free(pkey); in key2msblob_encode()
155 EVP_PKEY *pkey = NULL; in key2pvk_encode() local
161 if ((pkey = EVP_PKEY_new()) != NULL && set1_key(pkey, key) in key2pvk_encode()
164 ok = write_pvk(ctx, cout, pkey); in key2pvk_encode()
[all …]
/openssl/doc/man3/
H A DEVP_PKEY_set1_RSA.pod20 int EVP_PKEY_get_id(const EVP_PKEY *pkey);
21 int EVP_PKEY_get_base_id(const EVP_PKEY *pkey);
31 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key);
32 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key);
33 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key);
36 RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
37 DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
38 DH *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
39 EC_KEY *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
48 void *EVP_PKEY_get0(const EVP_PKEY *pkey);
[all …]
/openssl/apps/
H A Dgendsa.c58 EVP_PKEY *pkey = NULL; in gendsa_main() local
126 pkey = load_keyparams(dsaparams, FORMAT_UNDEF, 1, "DSA", "DSA parameters"); in gendsa_main()
132 nbits = EVP_PKEY_get_bits(pkey); in gendsa_main()
137 OPENSSL_DSA_MAX_MODULUS_BITS, EVP_PKEY_get_bits(pkey)); in gendsa_main()
139 ctx = EVP_PKEY_CTX_new_from_pkey(app_get0_libctx(), pkey, app_get0_propq()); in gendsa_main()
144 EVP_PKEY_free(pkey); in gendsa_main()
145 pkey = NULL; in gendsa_main()
150 pkey = app_keygen(ctx, "DSA", nbits, verbose); in gendsa_main()
151 if (pkey == NULL) in gendsa_main()
155 if (!PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, passout)) { in gendsa_main()
[all …]
H A Dpkey.c72 EVP_PKEY *pkey = NULL; in pkey_main() local
215 if (pkey == NULL) in pkey_main()
226 if (!EVP_PKEY_is_a(pkey, "EC")) in pkey_main()
237 if (EVP_PKEY_set_params(pkey, params) <= 0) in pkey_main()
245 ctx = EVP_PKEY_CTX_new(pkey, e); in pkey_main()
272 if (!PEM_write_bio_PUBKEY(out, pkey)) in pkey_main()
294 if (!i2d_PUBKEY_bio(out, pkey)) in pkey_main()
298 if (!i2d_PrivateKey_bio(out, pkey)) in pkey_main()
308 if (EVP_PKEY_print_public(out, pkey, 0, NULL) <= 0) in pkey_main()
312 if (EVP_PKEY_print_private(out, pkey, 0, NULL) <= 0) in pkey_main()
[all …]
/openssl/ssl/
H A Dssl_rsa_legacy.c19 EVP_PKEY *pkey; in SSL_use_RSAPrivateKey() local
26 if ((pkey = EVP_PKEY_new()) == NULL) { in SSL_use_RSAPrivateKey()
32 if (EVP_PKEY_assign_RSA(pkey, rsa) <= 0) { in SSL_use_RSAPrivateKey()
34 EVP_PKEY_free(pkey); in SSL_use_RSAPrivateKey()
38 ret = SSL_use_PrivateKey(ssl, pkey); in SSL_use_RSAPrivateKey()
39 EVP_PKEY_free(pkey); in SSL_use_RSAPrivateKey()
107 EVP_PKEY *pkey; in SSL_CTX_use_RSAPrivateKey() local
113 if ((pkey = EVP_PKEY_new()) == NULL) { in SSL_CTX_use_RSAPrivateKey()
121 EVP_PKEY_free(pkey); in SSL_CTX_use_RSAPrivateKey()
125 ret = SSL_CTX_use_PrivateKey(ctx, pkey); in SSL_CTX_use_RSAPrivateKey()
[all …]

Completed in 71 milliseconds

12345678910>>...13