Home
last modified time | relevance | path

Searched refs:p8 (Results 1 – 25 of 72) sorted by relevance

123

/openbsd/lib/libcrypto/asn1/
H A Da_pkey.c96 PKCS8_PRIV_KEY_INFO *p8 = NULL; in d2i_PrivateKey() local
98 p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, pp, length); in d2i_PrivateKey()
99 if (!p8) in d2i_PrivateKey()
102 ret = EVP_PKCS82PKEY(p8); in d2i_PrivateKey()
103 PKCS8_PRIV_KEY_INFO_free(p8); in d2i_PrivateKey()
127 PKCS8_PRIV_KEY_INFO *p8 = EVP_PKEY2PKCS8(a); in i2d_PrivateKey() local
128 int ret = i2d_PKCS8_PRIV_KEY_INFO(p8, pp); in i2d_PrivateKey()
129 PKCS8_PRIV_KEY_INFO_free(p8); in i2d_PrivateKey()
166 if (!p8) { in d2i_AutoPrivateKey()
170 ret = EVP_PKCS82PKEY(p8); in d2i_AutoPrivateKey()
[all …]
H A Dp8_pkey.c165 int *ppklen, const X509_ALGOR **pa, const PKCS8_PRIV_KEY_INFO *p8) in PKCS8_pkey_get0() argument
168 *ppkalg = p8->pkeyalg->algorithm; in PKCS8_pkey_get0()
170 *pk = ASN1_STRING_data(p8->pkey); in PKCS8_pkey_get0()
171 *ppklen = ASN1_STRING_length(p8->pkey); in PKCS8_pkey_get0()
174 *pa = p8->pkeyalg; in PKCS8_pkey_get0()
180 PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8) in STACK_OF()
182 return p8->attributes; in STACK_OF()
187 PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type, in PKCS8_pkey_add1_attr_by_NID() argument
190 if (X509at_add1_attr_by_NID(&p8->attributes, nid, type, bytes, in PKCS8_pkey_add1_attr_by_NID()
/openbsd/lib/libcrypto/pkcs12/
H A Dp12_p8e.c72 X509_SIG *p8 = NULL; in PKCS8_encrypt() local
75 if (!(p8 = X509_SIG_new())) { in PKCS8_encrypt()
88 X509_ALGOR_free(p8->algor); in PKCS8_encrypt()
89 p8->algor = pbe; in PKCS8_encrypt()
90 ASN1_OCTET_STRING_free(p8->digest); in PKCS8_encrypt()
91 p8->digest = PKCS12_item_i2d_encrypt(pbe, in PKCS8_encrypt()
93 if (!p8->digest) { in PKCS8_encrypt()
98 return p8; in PKCS8_encrypt()
101 X509_SIG_free(p8); in PKCS8_encrypt()
H A Dp12_sbag.c76 PKCS8_get_attr(PKCS8_PRIV_KEY_INFO *p8, int attr_nid) in PKCS8_get_attr() argument
78 return PKCS12_get_attr_gen(p8->attributes, attr_nid); in PKCS8_get_attr()
180 PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8) in PKCS12_SAFEBAG_create0_p8inf() argument
190 bag->value.keybag = p8; in PKCS12_SAFEBAG_create0_p8inf()
198 PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8) in PKCS12_SAFEBAG_create0_pkcs8() argument
209 bag->value.shkeybag = p8; in PKCS12_SAFEBAG_create0_pkcs8()
219 X509_SIG *p8; in PKCS12_SAFEBAG_create_pkcs8_encrypt() local
225 if ((p8 = PKCS8_encrypt(pbe_nid, pbe_ciph, pass, passlen, salt, saltlen, in PKCS12_SAFEBAG_create_pkcs8_encrypt()
229 if ((bag = PKCS12_SAFEBAG_create0_pkcs8(p8)) == NULL) { in PKCS12_SAFEBAG_create_pkcs8_encrypt()
230 X509_SIG_free(p8); in PKCS12_SAFEBAG_create_pkcs8_encrypt()
H A Dp12_crt.c231 PKCS8_PRIV_KEY_INFO *p8 = NULL; in PKCS12_add_key() local
234 if (!(p8 = EVP_PKEY2PKCS8(key))) in PKCS12_add_key()
236 if (key_usage && !PKCS8_add_keyusage(p8, key_usage)) in PKCS12_add_key()
240 NULL, 0, iter, p8); in PKCS12_add_key()
241 PKCS8_PRIV_KEY_INFO_free(p8); in PKCS12_add_key()
242 p8 = NULL; in PKCS12_add_key()
244 bag = PKCS12_SAFEBAG_create0_p8inf(p8); in PKCS12_add_key()
246 p8 = NULL; in PKCS12_add_key()
260 if (p8) in PKCS12_add_key()
261 PKCS8_PRIV_KEY_INFO_free(p8); in PKCS12_add_key()
H A Dp12_p8d.c67 PKCS8_decrypt(const X509_SIG *p8, const char *pass, int passlen) in PKCS8_decrypt() argument
69 return PKCS12_item_decrypt_d2i(p8->algor, in PKCS8_decrypt()
70 &PKCS8_PRIV_KEY_INFO_it, pass, passlen, p8->digest, 1); in PKCS8_decrypt()
H A Dp12_kiss.c228 PKCS8_PRIV_KEY_INFO *p8; in parse_bag() local
251 if (!(p8 = PKCS12_decrypt_skey(bag, pass, passlen))) in parse_bag()
253 *pkey = EVP_PKCS82PKEY(p8); in parse_bag()
254 PKCS8_PRIV_KEY_INFO_free(p8); in parse_bag()
H A Dpkcs12.h158 ASN1_TYPE *PKCS8_get_attr(PKCS8_PRIV_KEY_INFO *p8, int attr_nid);
170 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(const X509_SIG *p8, const char *pass,
176 PKCS8_PRIV_KEY_INFO *p8);
183 int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage);
H A Dp12_npas.c105 PKCS8_PRIV_KEY_INFO *p8 = NULL; in newpass_bag() local
113 if ((p8 = PKCS8_decrypt(bag->value.shkeybag, oldpass, -1)) == NULL) in newpass_bag()
119 iter, p8)) == NULL) in newpass_bag()
129 PKCS8_PRIV_KEY_INFO_free(p8); in newpass_bag()
H A Dpkcs12_local.h114 PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8);
115 PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8);
120 PKCS8_PRIV_KEY_INFO *p8);
H A Dp12_attr.c81 PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage) in PKCS8_add_keyusage() argument
85 return PKCS8_pkey_add1_attr_by_NID(p8, NID_key_usage, V_ASN1_BIT_STRING, in PKCS8_add_keyusage()
/openbsd/lib/libcrypto/evp/
H A Devp_pkey.c71 EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8) in EVP_PKCS82PKEY() argument
77 if (!PKCS8_pkey_get0(&algoid, NULL, NULL, NULL, p8)) in EVP_PKCS82PKEY()
93 if (!pkey->ameth->priv_decode(pkey, p8)) { in EVP_PKCS82PKEY()
115 PKCS8_PRIV_KEY_INFO *p8; in EVP_PKEY2PKCS8() local
117 if (!(p8 = PKCS8_PRIV_KEY_INFO_new())) { in EVP_PKEY2PKCS8()
124 if (!pkey->ameth->priv_encode(p8, pkey)) { in EVP_PKEY2PKCS8()
136 return p8; in EVP_PKEY2PKCS8()
139 PKCS8_PRIV_KEY_INFO_free(p8); in EVP_PKEY2PKCS8()
/openbsd/lib/libcrypto/pem/
H A Dpem_pk8.c117 X509_SIG *p8; in do_pk8pkey() local
140 p8 = PKCS8_encrypt(nid, enc, kstr, klen, NULL, 0, 0, p8inf); in do_pk8pkey()
145 ret = i2d_PKCS8_bio(bp, p8); in do_pk8pkey()
147 ret = PEM_write_bio_PKCS8(bp, p8); in do_pk8pkey()
148 X509_SIG_free(p8); in do_pk8pkey()
164 X509_SIG *p8 = NULL; in d2i_PKCS8PrivateKey_bio() local
169 p8 = d2i_PKCS8_bio(bp, NULL); in d2i_PKCS8PrivateKey_bio()
170 if (!p8) in d2i_PKCS8PrivateKey_bio()
178 X509_SIG_free(p8); in d2i_PKCS8PrivateKey_bio()
181 p8inf = PKCS8_decrypt(p8, psbuf, klen); in d2i_PKCS8PrivateKey_bio()
[all …]
H A Dpem_pkey.c105 X509_SIG *p8; in PEM_read_bio_PrivateKey() local
108 p8 = d2i_X509_SIG(NULL, &p, len); in PEM_read_bio_PrivateKey()
109 if (!p8) in PEM_read_bio_PrivateKey()
117 X509_SIG_free(p8); in PEM_read_bio_PrivateKey()
120 p8inf = PKCS8_decrypt(p8, psbuf, klen); in PEM_read_bio_PrivateKey()
121 X509_SIG_free(p8); in PEM_read_bio_PrivateKey()
/openbsd/usr.bin/openssl/
H A Dpkcs8.c200 X509_SIG *p8 = NULL; in pkcs8_main() local
279 if (!(p8 = PKCS8_encrypt(cfg.pbe_nid, in pkcs8_main()
287 PEM_write_bio_PKCS8(out, p8); in pkcs8_main()
289 i2d_PKCS8_bio(out, p8); in pkcs8_main()
312 p8 = PEM_read_bio_PKCS8(in, NULL, NULL, NULL); in pkcs8_main()
314 p8 = d2i_PKCS8_bio(in, NULL); in pkcs8_main()
320 if (!p8) { in pkcs8_main()
332 p8inf = PKCS8_decrypt(p8, p8pass, strlen(p8pass)); in pkcs8_main()
357 X509_SIG_free(p8); in pkcs8_main()
H A Dpkcs12.c899 const PKCS8_PRIV_KEY_INFO *p8; in dump_certs_pkeys_bag() local
906 if ((p8 = PKCS12_SAFEBAG_get0_p8inf(bag)) == NULL) in dump_certs_pkeys_bag()
908 if ((pkey = EVP_PKCS82PKEY(p8)) == NULL) in dump_certs_pkeys_bag()
910 print_attribs(out, PKCS8_pkey_get0_attrs(p8), "Key Attributes"); in dump_certs_pkeys_bag()
919 PKCS8_PRIV_KEY_INFO *p8; in dump_certs_pkeys_bag() local
934 if ((p8 = PKCS12_decrypt_skey(bag, pass, passlen)) == NULL) in dump_certs_pkeys_bag()
936 if ((pkey = EVP_PKCS82PKEY(p8)) == NULL) { in dump_certs_pkeys_bag()
937 PKCS8_PRIV_KEY_INFO_free(p8); in dump_certs_pkeys_bag()
940 print_attribs(out, PKCS8_pkey_get0_attrs(p8), "Key Attributes"); in dump_certs_pkeys_bag()
941 PKCS8_PRIV_KEY_INFO_free(p8); in dump_certs_pkeys_bag()
/openbsd/lib/libcrypto/x509/
H A Dx_all.c281 d2i_PKCS8_bio(BIO *bp, X509_SIG **p8) in d2i_PKCS8_bio() argument
283 return ASN1_item_d2i_bio(&X509_SIG_it, bp, p8); in d2i_PKCS8_bio()
288 i2d_PKCS8_bio(BIO *bp, X509_SIG *p8) in i2d_PKCS8_bio() argument
290 return ASN1_item_i2d_bio(&X509_SIG_it, bp, p8); in i2d_PKCS8_bio()
295 d2i_PKCS8_fp(FILE *fp, X509_SIG **p8) in d2i_PKCS8_fp() argument
297 return ASN1_item_d2i_fp(&X509_SIG_it, fp, p8); in d2i_PKCS8_fp()
302 i2d_PKCS8_fp(FILE *fp, X509_SIG *p8) in i2d_PKCS8_fp() argument
304 return ASN1_item_i2d_fp(&X509_SIG_it, fp, p8); in i2d_PKCS8_fp()
/openbsd/gnu/usr.bin/gcc/gcc/testsuite/gcc.c-torture/execute/
H A Dva-arg-18.c4 void f (L p0, L p1, L p2, L p3, L p4, L p5, L p6, L p7, L p8, ...) in f() argument
8 va_start (select, p8); in f()
H A Dva-arg-1.c4 f (L p0, L p1, L p2, L p3, L p4, L p5, L p6, L p7, L p8, ...) in f() argument
8 va_start (select, p8); in f()
H A Dva-arg-12.c5 void f (L p0, L p1, L p2, L p3, L p4, L p5, L p6, L p7, L p8, ...) in f() argument
9 va_start (select, p8); in f()
/openbsd/gnu/usr.bin/perl/cpan/bignum/t/
H A Dconst-bigint.t12 # second character is always silently converted to an "x", so, e.g., "0b1.1p8"
13 # is passed to the overload::constant subroutine as "0x1.1p8", and "01.1p+8"
125 0o1.164p8 0O1.164P8
134 0o0.0p8 0O0.0P8
149 01.164p8 01.164P8
158 00.0p8 00.0P8
173 0b1.0011101p8 0B1.0011101P8
H A Dconst-bigrat.t12 # second character is always silently converted to an "x", so, e.g., "0b1.1p8"
13 # is passed to the overload::constant subroutine as "0x1.1p8", and "01.1p+8"
125 0o1.164p8 0O1.164P8
134 0o0.0p8 0O0.0P8
149 01.164p8 01.164P8
158 00.0p8 00.0P8
173 0b1.0011101p8 0B1.0011101P8
H A Dconst-bigfloat.t12 # second character is always silently converted to an "x", so, e.g., "0b1.1p8"
13 # is passed to the overload::constant subroutine as "0x1.1p8", and "01.1p+8"
133 0o1.164p8 0O1.164P8
143 0o0.0p8 0O0.0P8
159 01.164p8 01.164P8
169 00.0p8 00.0P8
185 0b1.0011101p8 0B1.0011101P8
H A Dconst-bignum.t12 # second character is always silently converted to an "x", so, e.g., "0b1.1p8"
13 # is passed to the overload::constant subroutine as "0x1.1p8", and "01.1p+8"
135 0o1.164p8 0O1.164P8
145 0o0.0p8 0O0.0P8
161 01.164p8 01.164P8
171 00.0p8 00.0P8
187 0b1.0011101p8 0B1.0011101P8
/openbsd/gnu/usr.bin/perl/cpan/Math-BigRat/t/
H A Dconst-mbr.t12 # second character is always silently converted to an "x", so, e.g., "0b1.1p8"
13 # is passed to the overload::constant subroutine as "0x1.1p8", and "01.1p+8"
125 0o1.164p8 0O1.164P8
134 0o0.0p8 0O0.0P8
149 01.164p8 01.164P8
158 00.0p8 00.0P8
173 0b1.0011101p8 0B1.0011101P8

123