Searched refs:pkey (Results 1 - 25 of 147) sorted by relevance

123456

/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/evp/
H A Dp_lib.c85 int EVP_PKEY_bits(EVP_PKEY *pkey) argument
87 if (pkey && pkey->ameth && pkey->ameth->pkey_bits)
88 return pkey->ameth->pkey_bits(pkey);
92 int EVP_PKEY_size(EVP_PKEY *pkey) argument
94 if (pkey && pkey->ameth && pkey
99 EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) argument
143 EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) argument
207 pkey_set_type(EVP_PKEY *pkey, int type, const char *str, int len) argument
253 EVP_PKEY_set_type(EVP_PKEY *pkey, int type) argument
258 EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len) argument
263 EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) argument
271 EVP_PKEY_get0(EVP_PKEY *pkey) argument
277 EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) argument
285 EVP_PKEY_get1_RSA(EVP_PKEY *pkey) argument
297 EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) argument
305 EVP_PKEY_get1_DSA(EVP_PKEY *pkey) argument
318 EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) argument
326 EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) argument
341 EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) argument
349 EVP_PKEY_get1_DH(EVP_PKEY *pkey) argument
377 EVP_PKEY_id(const EVP_PKEY *pkey) argument
382 EVP_PKEY_base_id(const EVP_PKEY *pkey) argument
427 unsup_alg(BIO *out, const EVP_PKEY *pkey, int indent, const char *kstr) argument
436 EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) argument
445 EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) argument
454 EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) argument
462 EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid) argument
[all...]
H A Devp_pkey.c70 EVP_PKEY *pkey = NULL; local
77 if (!(pkey = EVP_PKEY_new())) {
82 if (!EVP_PKEY_set_type(pkey, OBJ_obj2nid(algoid)))
90 if (pkey->ameth->priv_decode)
92 if (!pkey->ameth->priv_decode(pkey, p8))
105 return pkey;
108 EVP_PKEY_free (pkey);
112 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey) argument
114 return EVP_PKEY2PKCS8_broken(pkey, PKCS8_O
119 EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken) argument
[all...]
H A Dp_verify.c66 unsigned int siglen, EVP_PKEY *pkey)
84 pkctx = EVP_PKEY_CTX_new(pkey, NULL);
101 if (pkey->type == v)
119 sigbuf,siglen,pkey->pkey.ptr));
65 EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, unsigned int siglen, EVP_PKEY *pkey) argument
H A Dp_sign.c79 EVP_PKEY *pkey)
97 size_t sltmp = (size_t)EVP_PKEY_size(pkey);
99 pkctx = EVP_PKEY_CTX_new(pkey, NULL);
119 if (pkey->type == v)
137 pkey->pkey.ptr));
78 EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey) argument
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/cmac/
H A Dcm_ameth.c64 static int cmac_size(const EVP_PKEY *pkey) argument
69 static void cmac_key_free(EVP_PKEY *pkey) argument
71 CMAC_CTX *cmctx = (CMAC_CTX *)pkey->pkey.ptr;
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/demos/
H A Dspkigen.c21 int SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
24 int EVP_PKEY_assign(EVP_PKEY *pkey, int type,char *key);
26 #define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
35 EVP_PKEY *pkey=NULL; local
40 pkey=EVP_PKEY_new();
58 if (!EVP_PKEY_assign_RSA(pkey,rsa)) goto err;
64 if (!SPKI_set_pubkey(spki,pkey)) goto err;
75 if (!NETSCAPE_SPKI_sign(spki,pkey,EVP_md5())) goto err;
78 PEM_write_RSAPrivateKey(stdout,pkey
[all...]
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/hmac/
H A Dhm_ameth.c70 static int hmac_size(const EVP_PKEY *pkey) argument
75 static void hmac_key_free(EVP_PKEY *pkey) argument
77 ASN1_OCTET_STRING *os = (ASN1_OCTET_STRING *)pkey->pkey.ptr;
87 static int hmac_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) argument
106 static int old_hmac_decode(EVP_PKEY *pkey, argument
113 EVP_PKEY_assign(pkey, EVP_PKEY_HMAC, os);
117 static int old_hmac_encode(const EVP_PKEY *pkey, unsigned char **pder) argument
120 ASN1_OCTET_STRING *os = (ASN1_OCTET_STRING *)pkey->pkey
[all...]
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/demos/sign/
H A Dsign.c86 EVP_PKEY * pkey; local
99 pkey = PEM_read_PrivateKey(fp, NULL, NULL, NULL);
102 if (pkey == NULL) {
112 err = EVP_SignFinal (&md_ctx, sig_buf, &sig_len, pkey);
119 EVP_PKEY_free (pkey);
134 pkey=X509_get_pubkey(x509);
135 if (pkey == NULL) {
144 err = EVP_VerifyFinal (&md_ctx, sig_buf, sig_len, pkey);
145 EVP_PKEY_free (pkey);
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/asn1/
H A Dasn1_locl.h86 int (*pub_print)(BIO *out, const EVP_PKEY *pkey, int indent,
91 int (*priv_print)(BIO *out, const EVP_PKEY *pkey, int indent,
97 int (*param_decode)(EVP_PKEY *pkey,
99 int (*param_encode)(const EVP_PKEY *pkey, unsigned char **pder);
103 int (*param_print)(BIO *out, const EVP_PKEY *pkey, int indent,
110 void (*pkey_free)(EVP_PKEY *pkey);
111 int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2);
115 int (*old_priv_decode)(EVP_PKEY *pkey,
117 int (*old_priv_encode)(const EVP_PKEY *pkey, unsigned char **pder);
121 EVP_PKEY *pkey);
[all...]
H A Di2d_pu.c80 return(i2d_RSAPublicKey(a->pkey.rsa,pp));
84 return(i2d_DSAPublicKey(a->pkey.dsa,pp));
88 return(i2o_ECPublicKey(a->pkey.ec, pp));
H A Dx_pubkey.c78 EVP_PKEY_free(pubkey->pkey);
90 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
98 if (pkey->ameth)
100 if (pkey->ameth->pub_encode)
102 if (!pkey->ameth->pub_encode(pk, pkey))
139 if (key->pkey != NULL)
141 CRYPTO_add(&key->pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);
142 return key->pkey;
174 /* Check to see if another thread set key->pkey firs
[all...]
H A Dp8_pkey.c71 if (key->pkey->value.octet_string)
72 OPENSSL_cleanse(key->pkey->value.octet_string->data,
73 key->pkey->value.octet_string->length);
81 ASN1_SIMPLE(PKCS8_PRIV_KEY_INFO, pkey, ASN1_ANY),
112 ASN1_TYPE_set(priv->pkey, pmtype, oct);
131 if(p8->pkey->type == V_ASN1_OCTET_STRING)
136 *pk = p8->pkey->value.octet_string->data;
137 *ppklen = p8->pkey->value.octet_string->length;
140 else if (p8->pkey->type == V_ASN1_SEQUENCE)
145 *pk = p8->pkey
[all...]
H A Dt_spki.c75 EVP_PKEY *pkey; local
83 pkey = X509_PUBKEY_get(spki->spkac->pubkey);
84 if(!pkey) BIO_printf(out, " Unable to load public key\n");
87 EVP_PKEY_print_public(out, pkey, 4, NULL);
88 EVP_PKEY_free(pkey);
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/dh/
H A Ddh_ameth.c66 static void int_dh_free(EVP_PKEY *pkey) argument
68 DH_free(pkey->pkey.dh);
71 static int dh_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) argument
117 EVP_PKEY_assign_DH(pkey, dh);
129 static int dh_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) argument
139 dh=pkey->pkey.dh;
184 static int dh_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8) argument
223 EVP_PKEY_assign_DH(pkey, d
236 dh_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) argument
298 dh_param_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) argument
311 dh_param_encode(const EVP_PKEY *pkey, unsigned char **pder) argument
391 int_dh_size(const EVP_PKEY *pkey) argument
396 dh_bits(const EVP_PKEY *pkey) argument
446 dh_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument
452 dh_public_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument
458 dh_private_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument
[all...]
H A Ddh_pmeth.c67 /* DH pkey context structure */
161 static int pkey_dh_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) argument
180 EVP_PKEY_assign_DH(pkey, dh);
186 static int pkey_dh_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) argument
189 if (ctx->pkey == NULL)
197 EVP_PKEY_assign_DH(pkey, dh);
198 /* Note: if error return, pkey is freed by parent routine */
199 if (!EVP_PKEY_copy_parameters(pkey, ctx->pkey))
201 return DH_generate_key(pkey
[all...]
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/ec/
H A Dec_ameth.c103 static int eckey_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) argument
105 EC_KEY *ec_key = pkey->pkey.ec;
190 static int eckey_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) argument
217 EVP_PKEY_assign_EC_KEY(pkey, eckey);
229 const EC_GROUP *group = EC_KEY_get0_group(b->pkey.ec);
230 const EC_POINT *pa = EC_KEY_get0_public_key(a->pkey.ec),
231 *pb = EC_KEY_get0_public_key(b->pkey.ec);
240 static int eckey_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8) argument
301 EVP_PKEY_assign_EC_KEY(pkey, ecke
312 eckey_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) argument
367 int_ec_size(const EVP_PKEY *pkey) argument
372 ec_bits(const EVP_PKEY *pkey) argument
395 ec_missing_parameters(const EVP_PKEY *pkey) argument
423 int_ec_free(EVP_PKEY *pkey) argument
523 eckey_param_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) argument
536 eckey_param_encode(const EVP_PKEY *pkey, unsigned char **pder) argument
541 eckey_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument
547 eckey_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument
554 eckey_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument
560 old_ec_priv_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) argument
573 old_ec_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) argument
578 ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) argument
[all...]
H A Dec_pmeth.c67 /* EC pkey context structure */
125 EC_KEY *ec = ctx->pkey->pkey.ec;
158 EC_KEY *ec = ctx->pkey->pkey.ec;
175 if (!ctx->pkey || !ctx->peerkey)
184 group = EC_KEY_get0_group(ctx->pkey->pkey.ec);
189 pubkey = EC_KEY_get0_public_key(ctx->peerkey->pkey.ec);
197 ret = ECDH_compute_key(key, outlen, pubkey, ctx->pkey
268 pkey_ec_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) argument
289 pkey_ec_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) argument
[all...]
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/dsa/
H A Ddsa_ameth.c69 static int dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) argument
126 EVP_PKEY_assign_DSA(pkey, dsa);
138 static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) argument
146 dsa=pkey->pkey.dsa;
147 if (pkey->save_parameters && dsa->p && dsa->q && dsa->g)
190 static int dsa_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8) argument
283 EVP_PKEY_assign_DSA(pkey, dsa);
303 static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) argument
318 params->length = i2d_DSAparams(pkey
355 int_dsa_size(const EVP_PKEY *pkey) argument
360 dsa_bits(const EVP_PKEY *pkey) argument
365 dsa_missing_parameters(const EVP_PKEY *pkey) argument
416 int_dsa_free(EVP_PKEY *pkey) argument
490 dsa_param_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) argument
503 dsa_param_encode(const EVP_PKEY *pkey, unsigned char **pder) argument
508 dsa_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument
514 dsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument
521 dsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument
527 old_dsa_priv_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) argument
540 old_dsa_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) argument
591 dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) argument
[all...]
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/pkcs12/
H A Dp12_kiss.c66 EVP_PKEY **pkey, STACK_OF(X509) *ocerts);
69 int passlen, EVP_PKEY **pkey, STACK_OF(X509) *ocerts);
72 EVP_PKEY **pkey, STACK_OF(X509) *ocerts);
76 * or it should point to a valid STACK structure. pkey and cert can be
80 int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, argument
93 if(pkey)
94 *pkey = NULL;
127 if (!parse_pk12 (p12, pass, -1, pkey, ocerts))
135 if (pkey && *pkey
179 parse_pk12(PKCS12 *p12, const char *pass, int passlen, EVP_PKEY **pkey, STACK_OF(X509) *ocerts) argument
224 parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PKEY **pkey, STACK_OF(X509) *ocerts) argument
[all...]
/netbsd-6-1-5-RELEASE/external/bsd/bind/dist/lib/dns/
H A Dopensslgost_link.c103 EVP_PKEY *pkey = key->keydata.pkey; local
107 if (r.length < (unsigned int) EVP_PKEY_size(pkey))
110 if (!EVP_SignFinal(evp_md_ctx, r.base, &siglen, pkey))
123 EVP_PKEY *pkey = key->keydata.pkey; local
125 status = EVP_VerifyFinal(evp_md_ctx, sig->base, sig->length, pkey);
141 pkey1 = key1->keydata.pkey;
142 pkey2 = key2->keydata.pkey;
177 EVP_PKEY *pkey local
213 EVP_PKEY *pkey = key->keydata.pkey; local
224 EVP_PKEY *pkey = key->keydata.pkey; local
240 EVP_PKEY *pkey; local
266 EVP_PKEY *pkey = NULL; local
291 EVP_PKEY *pkey; local
331 EVP_PKEY *pkey = NULL; local
[all...]
H A Dopensslecdsa_link.c131 EVP_PKEY *pkey = key->keydata.pkey; local
132 EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
181 EVP_PKEY *pkey = key->keydata.pkey; local
182 EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
238 EVP_PKEY *pkey1 = key1->keydata.pkey;
239 EVP_PKEY *pkey2 = key2->keydata.pkey;
281 EVP_PKEY *pkey; local
304 pkey
323 EVP_PKEY *pkey = key->keydata.pkey; local
334 EVP_PKEY *pkey = key->keydata.pkey; local
343 EVP_PKEY *pkey; local
379 EVP_PKEY *pkey; local
439 EVP_PKEY *pkey; local
479 EVP_PKEY *pkey; local
509 EVP_PKEY *pkey; local
[all...]
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/ssl/
H A Dssl_rsa.c68 static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey);
154 EVP_PKEY *pkey; local
167 if ((pkey=EVP_PKEY_new()) == NULL)
174 EVP_PKEY_assign_RSA(pkey,rsa);
176 ret=ssl_set_pkey(ssl->cert,pkey);
177 EVP_PKEY_free(pkey);
182 static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey) argument
186 i=ssl_cert_type(NULL,pkey);
197 EVP_PKEY_copy_parameters(pktmp,pkey);
204 if ((pkey
295 SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey) argument
318 EVP_PKEY *pkey=NULL; local
365 EVP_PKEY *pkey; local
396 EVP_PKEY *pkey; local
524 EVP_PKEY *pkey; local
617 SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) argument
637 EVP_PKEY *pkey=NULL; local
685 EVP_PKEY *pkey; local
[all...]
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/pem/
H A Dpem_sign.c79 EVP_PKEY *pkey)
85 m=(unsigned char *)OPENSSL_malloc(EVP_PKEY_size(pkey)+2);
92 if (EVP_SignFinal(ctx,m,&m_len,pkey) <= 0) goto err;
78 PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey) argument
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/apps/
H A Dpkeyparam.c74 EVP_PKEY *pkey=NULL; local
178 pkey = PEM_read_bio_Parameters(in, NULL);
179 if (!pkey)
187 PEM_write_bio_Parameters(out,pkey);
190 EVP_PKEY_print_params(out, pkey, 0, NULL);
195 EVP_PKEY_free(pkey);
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/crypto/engine/
H A Deng_pkey.c99 EVP_PKEY *pkey; local
122 pkey = e->load_privkey(e, key_id, ui_method, callback_data);
123 if (!pkey)
129 return pkey;
135 EVP_PKEY *pkey; local
158 pkey = e->load_pubkey(e, key_id, ui_method, callback_data);
159 if (!pkey)
165 return pkey;

Completed in 136 milliseconds

123456