/openssl/crypto/asn1/ |
H A D | p8_pkey.c | 55 const X509_ALGOR **pa, const PKCS8_PRIV_KEY_INFO *p8) in PKCS8_pkey_get0() argument 58 *ppkalg = p8->pkeyalg->algorithm; in PKCS8_pkey_get0() 60 *pk = ASN1_STRING_get0_data(p8->pkey); in PKCS8_pkey_get0() 61 *ppklen = ASN1_STRING_length(p8->pkey); in PKCS8_pkey_get0() 64 *pa = p8->pkeyalg; in PKCS8_pkey_get0() 69 PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8) in STACK_OF() 71 return p8->attributes; in STACK_OF() 74 int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type, in PKCS8_pkey_add1_attr_by_NID() argument 77 if (X509at_add1_attr_by_NID(&p8->attributes, nid, type, bytes, len) != NULL) in PKCS8_pkey_add1_attr_by_NID() 88 int PKCS8_pkey_add1_attr(PKCS8_PRIV_KEY_INFO *p8, X509_ATTRIBUTE *attr) in PKCS8_pkey_add1_attr() argument [all …]
|
H A D | d2i_pr.c | 121 PKCS8_PRIV_KEY_INFO *p8 = NULL; in ossl_d2i_PrivateKey_legacy() local 122 p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); in ossl_d2i_PrivateKey_legacy() 123 if (p8 == NULL) { in ossl_d2i_PrivateKey_legacy() 127 tmp = evp_pkcs82pkey_legacy(p8, libctx, propq); in ossl_d2i_PrivateKey_legacy() 128 PKCS8_PRIV_KEY_INFO_free(p8); in ossl_d2i_PrivateKey_legacy() 203 PKCS8_PRIV_KEY_INFO *p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, length); in d2i_AutoPrivateKey_legacy() local 207 if (p8 == NULL) { in d2i_AutoPrivateKey_legacy() 211 ret = evp_pkcs82pkey_legacy(p8, libctx, propq); in d2i_AutoPrivateKey_legacy() 212 PKCS8_PRIV_KEY_INFO_free(p8); in d2i_AutoPrivateKey_legacy()
|
H A D | i2d_evp.c | 109 PKCS8_PRIV_KEY_INFO *p8 = EVP_PKEY2PKCS8(a); in i2d_PrivateKey() local 112 if (p8 != NULL) { in i2d_PrivateKey() 113 ret = i2d_PKCS8_PRIV_KEY_INFO(p8, pp); in i2d_PrivateKey() 114 PKCS8_PRIV_KEY_INFO_free(p8); in i2d_PrivateKey()
|
/openssl/crypto/evp/ |
H A D | evp_pkey.c | 32 if (!PKCS8_pkey_get0(&algoid, NULL, NULL, NULL, p8)) in evp_pkcs82pkey_legacy() 51 if (!pkey->ameth->priv_decode(pkey, p8)) { in evp_pkcs82pkey_legacy() 80 if (p8 == NULL in EVP_PKCS82PKEY_ex() 119 return EVP_PKCS82PKEY_ex(p8, NULL, NULL); in EVP_PKCS82PKEY() 126 PKCS8_PRIV_KEY_INFO *p8 = NULL; in EVP_PKEY2PKCS8() local 149 if (p8 == NULL) in EVP_PKEY2PKCS8() 152 p8 = PKCS8_PRIV_KEY_INFO_new(); in EVP_PKEY2PKCS8() 153 if (p8 == NULL) { in EVP_PKEY2PKCS8() 175 PKCS8_PRIV_KEY_INFO_free(p8); in EVP_PKEY2PKCS8() 176 p8 = NULL; in EVP_PKEY2PKCS8() [all …]
|
/openssl/crypto/pkcs12/ |
H A D | p12_p8e.c | 22 X509_SIG *p8 = NULL; in PKCS8_encrypt_ex() local 51 p8 = PKCS8_set0_pbe_ex(pass, passlen, p8inf, pbe, libctx, propq); in PKCS8_encrypt_ex() 52 if (p8 == NULL) { in PKCS8_encrypt_ex() 57 return p8; in PKCS8_encrypt_ex() 73 X509_SIG *p8; in PKCS8_set0_pbe_ex() local 84 p8 = OPENSSL_zalloc(sizeof(*p8)); in PKCS8_set0_pbe_ex() 86 if (p8 == NULL) { in PKCS8_set0_pbe_ex() 90 p8->algor = pbe; in PKCS8_set0_pbe_ex() 91 p8->digest = enckey; in PKCS8_set0_pbe_ex() 93 return p8; in PKCS8_set0_pbe_ex()
|
H A D | p12_p8d.c | 14 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt_ex(const X509_SIG *p8, const char *pass, in PKCS8_decrypt_ex() argument 21 X509_SIG_get0(p8, &dalg, &doct); in PKCS8_decrypt_ex() 27 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(const X509_SIG *p8, const char *pass, in PKCS8_decrypt() argument 30 return PKCS8_decrypt_ex(p8, pass, passlen, NULL, NULL); in PKCS8_decrypt()
|
H A D | p12_sbag.c | 29 ASN1_TYPE *PKCS8_get_attr(PKCS8_PRIV_KEY_INFO *p8, int attr_nid) in PKCS8_get_attr() argument 31 return PKCS12_get_attr_gen(PKCS8_pkey_get0_attrs(p8), attr_nid); in PKCS8_get_attr() 209 PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8) in PKCS12_SAFEBAG_create0_p8inf() argument 218 bag->value.keybag = p8; in PKCS12_SAFEBAG_create0_p8inf() 224 PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8) in PKCS12_SAFEBAG_create0_pkcs8() argument 234 bag->value.shkeybag = p8; in PKCS12_SAFEBAG_create0_pkcs8() 250 X509_SIG *p8; in PKCS12_SAFEBAG_create_pkcs8_encrypt_ex() local 261 p8 = PKCS8_encrypt_ex(pbe_nid, pbe_ciph, pass, passlen, salt, saltlen, iter, in PKCS12_SAFEBAG_create_pkcs8_encrypt_ex() 263 if (p8 == NULL) in PKCS12_SAFEBAG_create_pkcs8_encrypt_ex() 266 bag = PKCS12_SAFEBAG_create0_pkcs8(p8); in PKCS12_SAFEBAG_create_pkcs8_encrypt_ex() [all …]
|
H A D | p12_crt.c | 244 PKCS8_PRIV_KEY_INFO *p8 = NULL; in PKCS12_add_key_ex() local 247 if ((p8 = EVP_PKEY2PKCS8(key)) == NULL) in PKCS12_add_key_ex() 249 if (key_usage && !PKCS8_add_keyusage(p8, key_usage)) in PKCS12_add_key_ex() 254 iter, p8, ctx, propq); in PKCS12_add_key_ex() 256 bag = PKCS12_SAFEBAG_create0_p8inf(p8); in PKCS12_add_key_ex() 258 p8 = NULL; /* bag takes ownership of p8 */ in PKCS12_add_key_ex() 261 if (p8 != NULL) in PKCS12_add_key_ex() 262 PKCS8_PRIV_KEY_INFO_free(p8); in PKCS12_add_key_ex()
|
H A D | p12_npas.c | 160 PKCS8_PRIV_KEY_INFO *p8; in newpass_bag() local 168 if ((p8 = PKCS8_decrypt_ex(bag->value.shkeybag, oldpass, -1, in newpass_bag() 173 PKCS8_PRIV_KEY_INFO_free(p8); in newpass_bag() 179 PKCS8_PRIV_KEY_INFO_free(p8); in newpass_bag() 184 p8_iter, p8, libctx, propq); in newpass_bag() 185 PKCS8_PRIV_KEY_INFO_free(p8); in newpass_bag()
|
H A D | p12_kiss.c | 194 PKCS8_PRIV_KEY_INFO *p8; in parse_bag() local 219 if ((p8 = PKCS12_decrypt_skey_ex(bag, pass, passlen, in parse_bag() 222 *pkey = EVP_PKCS82PKEY_ex(p8, libctx, propq); in parse_bag() 223 PKCS8_PRIV_KEY_INFO_free(p8); in parse_bag()
|
H A D | p12_attr.c | 29 int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage) in PKCS8_add_keyusage() argument 32 return PKCS8_pkey_add1_attr_by_NID(p8, NID_key_usage, in PKCS8_add_keyusage()
|
/openssl/doc/man3/ |
H A D | PKCS8_pkey_add1_attr.pod | 12 PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8); 13 int PKCS8_pkey_add1_attr(PKCS8_PRIV_KEY_INFO *p8, X509_ATTRIBUTE *attr); 14 int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type, 16 int PKCS8_pkey_add1_attr_by_OBJ(PKCS8_PRIV_KEY_INFO *p8, const ASN1_OBJECT *obj, 22 the passed const PKCS8_PRIV_KEY_INFO structure B<p8>. 25 existing PKCS8_PRIV_KEY_INFO structure B<p8>. 29 PKCS8_PRIV_KEY_INFO structure B<p8>.
|
H A D | PKCS8_encrypt.pod | 12 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(const X509_SIG *p8, const char *pass, 14 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt_ex(const X509_SIG *p8, const char *pass, 19 int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8); 22 int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8, 32 PKCS8_encrypt() and PKCS8_encrypt_ex() perform encryption of an object I<p8> using 39 I<p8> using the password I<pass> of length I<passlen> along with algorithm 40 parameters obtained from the I<p8>.
|
H A D | EVP_PKEY2PKCS8.pod | 13 EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8); 14 EVP_PKEY *EVP_PKCS82PKEY_ex(const PKCS8_PRIV_KEY_INFO *p8, OSSL_LIB_CTX *libctx, 21 EVP_PKCS82PKEY_ex() converts a PKCS8 object I<p8> into a returned private key.
|
/openssl/crypto/pem/ |
H A D | pem_pk8.c | 127 X509_SIG *p8; in do_pk8pkey() local 149 if (p8 == NULL) in do_pk8pkey() 152 ret = i2d_PKCS8_bio(bp, p8); in do_pk8pkey() 154 ret = PEM_write_bio_PKCS8(bp, p8); in do_pk8pkey() 155 X509_SIG_free(p8); in do_pk8pkey() 173 X509_SIG *p8 = NULL; in d2i_PKCS8PrivateKey_bio() local 178 p8 = d2i_PKCS8_bio(bp, NULL); in d2i_PKCS8PrivateKey_bio() 179 if (p8 == NULL) in d2i_PKCS8PrivateKey_bio() 187 X509_SIG_free(p8); in d2i_PKCS8PrivateKey_bio() 190 p8inf = PKCS8_decrypt(p8, psbuf, klen); in d2i_PKCS8PrivateKey_bio() [all …]
|
H A D | pem_pkey.c | 148 X509_SIG *p8; in pem_read_bio_key_legacy() local 152 if ((p8 = d2i_X509_SIG(NULL, &p, len)) == NULL) in pem_read_bio_key_legacy() 160 X509_SIG_free(p8); in pem_read_bio_key_legacy() 163 p8inf = PKCS8_decrypt(p8, psbuf, klen); in pem_read_bio_key_legacy() 164 X509_SIG_free(p8); in pem_read_bio_key_legacy()
|
/openssl/apps/ |
H A D | pkcs8.c | 81 X509_SIG *p8 = NULL; in pkcs8_main() local 287 p8 = PKCS8_set0_pbe(p8pass, strlen(p8pass), p8inf, pbe); in pkcs8_main() 288 if (p8 == NULL) { in pkcs8_main() 296 PEM_write_bio_PKCS8(out, p8); in pkcs8_main() 298 i2d_PKCS8_bio(out, p8); in pkcs8_main() 320 p8 = PEM_read_bio_PKCS8(in, NULL, NULL, NULL); in pkcs8_main() 322 p8 = d2i_PKCS8_bio(in, NULL); in pkcs8_main() 328 if (p8 == NULL) { in pkcs8_main() 347 p8inf = PKCS8_decrypt(p8, p8pass, strlen(p8pass)); in pkcs8_main() 381 X509_SIG_free(p8); in pkcs8_main()
|
/openssl/providers/implementations/encode_decode/ |
H A D | decode_epki2pki.c | 92 X509_SIG *p8 = NULL; in epki2pki_decode() local 114 if ((p8 = d2i_X509_SIG(NULL, &pder, der_len)) != NULL) { in epki2pki_decode() 128 X509_SIG_get0(p8, &alg, &oct); in epki2pki_decode() 142 X509_SIG_free(p8); in epki2pki_decode()
|
H A D | encode_key2any.c | 106 X509_SIG *p8 = NULL; in p8info_to_encp8() local 122 return p8; in p8info_to_encp8() 131 X509_SIG *p8 = NULL; in key_to_encp8() local 139 return p8; in key_to_encp8() 195 X509_SIG *p8; in key_to_epki_der_priv_bio() local 205 if (p8 != NULL) in key_to_epki_der_priv_bio() 206 ret = i2d_PKCS8_bio(out, p8); in key_to_epki_der_priv_bio() 208 X509_SIG_free(p8); in key_to_epki_der_priv_bio() 223 X509_SIG *p8; in key_to_epki_pem_priv_bio() local 233 if (p8 != NULL) in key_to_epki_pem_priv_bio() [all …]
|
/openssl/crypto/poly1305/asm/ |
H A D | poly1305-ia64.S | 148 { .mmi; cmp.eq p8,p7=0,r29 159 (p8) ld8 i0=[r10],16 // aligned input 160 (p8) ld8 i1=[r11],16 161 (p8) br.cond.sptk .Loop };; 164 .pred.rel "mutex",p8,p9,p10,p11,p12,p13,p14,p15 187 .pred.rel "mutex",p8,p9,p10,p11,p12,p13,p14,p15 250 { .mmi; (p8) mov i0=r15 260 { .mmi; (p8) mov i1=r16
|
/openssl/test/helpers/ |
H A D | pkcs12.c | 588 PKCS8_PRIV_KEY_INFO *p8; in check_keybag() local 617 p8 = PKCS12_decrypt_skey(bag, enc->pass, strlen(enc->pass)); in check_keybag() 619 p8 = PKCS12_decrypt_skey_ex(bag, enc->pass, strlen(enc->pass), test_ctx, test_propq); in check_keybag() 620 if (!TEST_ptr(p8)) { in check_keybag() 624 if (!TEST_ptr(pkey = EVP_PKCS82PKEY(p8))) { in check_keybag() 625 PKCS8_PRIV_KEY_INFO_free(p8); in check_keybag() 629 PKCS8_PRIV_KEY_INFO_free(p8); in check_keybag()
|
/openssl/include/openssl/ |
H A D | pkcs12.h.in | 98 ASN1_TYPE *PKCS8_get_attr(PKCS8_PRIV_KEY_INFO *p8, int attr_nid); 126 PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8); 127 PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8); 145 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(const X509_SIG *p8, const char *pass, 147 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt_ex(const X509_SIG *p8, const char *pass, 158 int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8); 161 int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8, 198 int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage);
|
/openssl/crypto/store/ |
H A D | store_result.c | 329 X509_SIG *p8 = NULL; in try_key_value_legacy() local 334 p8 = d2i_X509_SIG(NULL, &derp, der_len); in try_key_value_legacy() 336 if (p8 != NULL) { in try_key_value_legacy() 347 X509_SIG_get0(p8, &alg, &oct); in try_key_value_legacy() 359 X509_SIG_free(p8); in try_key_value_legacy()
|
/openssl/crypto/x509/ |
H A D | x_all.c | 652 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8) in d2i_PKCS8_fp() argument 654 return ASN1_d2i_fp_of(X509_SIG, X509_SIG_new, d2i_X509_SIG, fp, p8); in d2i_PKCS8_fp() 657 int i2d_PKCS8_fp(FILE *fp, const X509_SIG *p8) in i2d_PKCS8_fp() argument 659 return ASN1_i2d_fp_of(X509_SIG, i2d_X509_SIG, fp, p8); in i2d_PKCS8_fp() 663 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8) in d2i_PKCS8_bio() argument 665 return ASN1_d2i_bio_of(X509_SIG, X509_SIG_new, d2i_X509_SIG, bp, p8); in d2i_PKCS8_bio() 668 int i2d_PKCS8_bio(BIO *bp, const X509_SIG *p8) in i2d_PKCS8_bio() argument 670 return ASN1_i2d_bio_of(X509_SIG, i2d_X509_SIG, bp, p8); in i2d_PKCS8_bio()
|
/openssl/crypto/dsa/ |
H A D | dsa_ameth.c | 150 static int dsa_priv_decode(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8) in dsa_priv_decode() argument 153 DSA *dsa = ossl_dsa_key_from_pkcs8(p8, NULL, NULL); in dsa_priv_decode() 163 static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) in dsa_priv_encode() argument 206 if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(NID_dsa), 0, in dsa_priv_encode()
|