/barrelfish-master/lib/openssl-1.0.0d/crypto/evp/ |
H A D | p_lib.c | 85 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 D | evp_pkey.c | 70 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 D | p_verify.c | 66 unsigned int siglen, EVP_PKEY *pkey) 82 pkctx = EVP_PKEY_CTX_new(pkey, NULL); 99 if (pkey->type == v) 117 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 D | p_sign.c | 79 EVP_PKEY *pkey) 95 size_t sltmp = (size_t)EVP_PKEY_size(pkey); 97 pkctx = EVP_PKEY_CTX_new(pkey, NULL); 117 if (pkey->type == v) 135 pkey->pkey.ptr)); 78 EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey) argument
|
/barrelfish-master/lib/openssl-1.0.0d/demos/ |
H A D | spkigen.c | 21 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...] |
/barrelfish-master/lib/openssl-1.0.0d/crypto/hmac/ |
H A D | hm_ameth.c | 70 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...] |
/barrelfish-master/lib/openssl-1.0.0d/demos/sign/ |
H A D | sign.c | 86 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);
|
/barrelfish-master/lib/openssl-1.0.0d/crypto/rsa/ |
H A D | rsa_ameth.c | 70 static int rsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) argument 74 penclen = i2d_RSAPublicKey(pkey->pkey.rsa, &penc); 85 static int rsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) argument 97 EVP_PKEY_assign_RSA (pkey, rsa); 103 if (BN_cmp(b->pkey.rsa->n,a->pkey.rsa->n) != 0 104 || BN_cmp(b->pkey.rsa->e,a->pkey.rsa->e) != 0) 109 static int old_rsa_priv_decode(EVP_PKEY *pkey, argument 122 old_rsa_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) argument 127 rsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) argument 149 rsa_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8) argument 158 int_rsa_size(const EVP_PKEY *pkey) argument 163 rsa_bits(const EVP_PKEY *pkey) argument 168 int_rsa_free(EVP_PKEY *pkey) argument 255 rsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument 262 rsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument 269 rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) argument [all...] |
/barrelfish-master/lib/openssl-1.0.0d/demos/maurice/ |
H A D | loadkeys.c | 29 EVP_PKEY *pkey; local 44 pkey=X509_extract_key(x509); 48 if (pkey == NULL) 51 return pkey; 57 EVP_PKEY *pkey; local 62 pkey = PEM_read_PrivateKey(fp, NULL, 0, NULL); 66 if (pkey == NULL) 69 return pkey;
|
/barrelfish-master/lib/openssl-1.0.0d/crypto/dh/ |
H A D | dh_ameth.c | 66 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 D | dh_pmeth.c | 67 /* 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...] |
/barrelfish-master/lib/openssl-1.0.0d/crypto/asn1/ |
H A D | asn1_locl.h | 86 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, 106 void (*pkey_free)(EVP_PKEY *pkey); 107 int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2); 111 int (*old_priv_decode)(EVP_PKEY *pkey, 113 int (*old_priv_encode)(const EVP_PKEY *pkey, unsigned char **pder);
|
H A D | x_pubkey.c | 78 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 key->pkey [all...] |
H A D | p8_pkey.c | 71 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 D | t_spki.c | 75 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);
|
H A D | i2d_pu.c | 80 return(i2d_RSAPublicKey(a->pkey.rsa,pp)); 84 return(i2d_DSAPublicKey(a->pkey.dsa,pp)); 88 return(i2o_ECPublicKey(a->pkey.ec, pp));
|
/barrelfish-master/include/openssl/local/ |
H A D | asn1_locl.h | 86 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, 106 void (*pkey_free)(EVP_PKEY *pkey); 107 int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2); 111 int (*old_priv_decode)(EVP_PKEY *pkey, 113 int (*old_priv_encode)(const EVP_PKEY *pkey, unsigned char **pder);
|
/barrelfish-master/lib/openssl-1.0.0d/crypto/dsa/ |
H A D | dsa_ameth.c | 69 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 545 dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) argument [all...] |
/barrelfish-master/lib/openssl-1.0.0d/crypto/pkcs12/ |
H A D | p12_kiss.c | 66 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...] |
/barrelfish-master/lib/openssl-1.0.0d/ssl/ |
H A D | ssl_rsa.c | 68 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...] |
/barrelfish-master/lib/openssl-1.0.0d/crypto/ec/ |
H A D | ec_ameth.c | 103 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 366 int_ec_size(const EVP_PKEY *pkey) argument 371 ec_bits(const EVP_PKEY *pkey) argument 394 ec_missing_parameters(const EVP_PKEY *pkey) argument 422 int_ec_free(EVP_PKEY *pkey) argument 522 eckey_param_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) argument 535 eckey_param_encode(const EVP_PKEY *pkey, unsigned char **pder) argument 540 eckey_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument 546 eckey_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument 553 eckey_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument 559 old_ec_priv_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) argument 572 old_ec_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) argument 577 ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) argument [all...] |
H A D | ec_pmeth.c | 67 /* 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 267 pkey_ec_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) argument 288 pkey_ec_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) argument [all...] |
/barrelfish-master/lib/openssl-1.0.0d/crypto/pem/ |
H A D | pem_sign.c | 79 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
|
/barrelfish-master/lib/openssl-1.0.0d/apps/ |
H A D | pkeyparam.c | 74 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);
|
/barrelfish-master/lib/openssl-1.0.0d/crypto/engine/ |
H A D | eng_pkey.c | 99 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;
|