Home
last modified time | relevance | path

Searched refs:bag (Results 1 – 24 of 24) sorted by relevance

/openssl/crypto/pkcs12/
H A Dp12_sbag.c72 return OBJ_obj2nid(bag->value.bag->type); in PKCS12_SAFEBAG_get_bag_nid()
77 return bag->value.bag->type; in PKCS12_SAFEBAG_get0_bag_type()
82 return bag->value.bag->value.other; in PKCS12_SAFEBAG_get0_bag_obj()
91 return ASN1_item_unpack(bag->value.bag->value.octet, in PKCS12_SAFEBAG_get1_cert()
99 if (OBJ_obj2nid(bag->value.bag->type) != NID_x509Crl) in PKCS12_SAFEBAG_get1_crl()
101 return ASN1_item_unpack(bag->value.bag->value.octet, in PKCS12_SAFEBAG_get1_crl()
114 ret = ASN1_item_unpack_ex(bag->value.bag->value.octet, in PKCS12_SAFEBAG_get1_cert_ex()
130 if (OBJ_obj2nid(bag->value.bag->type) != NID_x509Crl) in PKCS12_SAFEBAG_get1_crl_ex()
132 ret = ASN1_item_unpack_ex(bag->value.bag->value.octet, in PKCS12_SAFEBAG_get1_crl_ex()
198 safebag->value.bag = bag; in PKCS12_SAFEBAG_create_secret()
[all …]
H A Dp12_attr.c20 if (X509at_add1_attr_by_NID(&bag->attrib, NID_localKeyID, in PKCS12_add_localkeyid()
41 if (X509at_add1_attr_by_NID(&bag->attrib, NID_friendlyName, in PKCS12_add_friendlyname_asc()
51 if (X509at_add1_attr_by_NID(&bag->attrib, NID_friendlyName, in PKCS12_add_friendlyname_utf8()
58 int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag, in PKCS12_add_friendlyname_uni() argument
70 if (X509at_add1_attr_by_NID(&bag->attrib, NID_ms_csp_name, in PKCS12_add_CSPName_asc()
105 char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag) in PKCS12_get_friendlyname() argument
118 PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag) in STACK_OF()
120 return bag->attrib; in STACK_OF()
125 if (bag->attrib != attrs) in PKCS12_SAFEBAG_set0_attrs()
126 sk_X509_ATTRIBUTE_free(bag->attrib); in PKCS12_SAFEBAG_set0_attrs()
[all …]
H A Dp12_crt.c44 PKCS12_SAFEBAG *bag = NULL; in PKCS12_create_ex2() local
122 if (!bag) in PKCS12_create_ex2()
199 PKCS12_SAFEBAG *bag = NULL; in pkcs12_add_cert_bag() local
214 return bag; in pkcs12_add_cert_bag()
217 PKCS12_SAFEBAG_free(bag); in pkcs12_add_cert_bag()
257 if (bag != NULL) in PKCS12_add_key_ex()
264 if (bag == NULL || !pkcs12_add_bag(pbags, bag)) in PKCS12_add_key_ex()
267 return bag; in PKCS12_add_key_ex()
270 PKCS12_SAFEBAG_free(bag); in PKCS12_add_key_ex()
295 return bag; in PKCS12_add_secret()
[all …]
H A Dp12_add.c23 PKCS12_BAGS *bag; in PKCS12_item_pack_safebag() local
26 if ((bag = PKCS12_BAGS_new()) == NULL) { in PKCS12_item_pack_safebag()
30 bag->type = OBJ_nid2obj(nid1); in PKCS12_item_pack_safebag()
31 if (!ASN1_item_pack(obj, it, &bag->value.octet)) { in PKCS12_item_pack_safebag()
39 safebag->value.bag = bag; in PKCS12_item_pack_safebag()
44 PKCS12_BAGS_free(bag); in PKCS12_item_pack_safebag()
174 PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey_ex(const PKCS12_SAFEBAG *bag, in PKCS12_decrypt_skey_ex() argument
178 return PKCS8_decrypt_ex(bag->value.shkeybag, pass, passlen, ctx, propq); in PKCS12_decrypt_skey_ex()
181 PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag, in PKCS12_decrypt_skey() argument
184 return PKCS12_decrypt_skey_ex(bag, pass, passlen, NULL, NULL); in PKCS12_decrypt_skey()
H A Dp12_kiss.c24 static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
190 static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, in parse_bag() argument
200 if ((attrib = PKCS12_SAFEBAG_get0_attr(bag, NID_friendlyName))) in parse_bag()
203 if ((attrib = PKCS12_SAFEBAG_get0_attr(bag, NID_localKeyID))) in parse_bag()
206 switch (PKCS12_SAFEBAG_get_nid(bag)) { in parse_bag()
210 *pkey = EVP_PKCS82PKEY_ex(PKCS12_SAFEBAG_get0_p8inf(bag), in parse_bag()
219 if ((p8 = PKCS12_decrypt_skey_ex(bag, pass, passlen, in parse_bag()
230 || PKCS12_SAFEBAG_get_bag_nid(bag) != NID_x509Certificate) in parse_bag()
232 if ((x509 = PKCS12_SAFEBAG_get1_cert_ex(bag, libctx, propq)) == NULL) in parse_bag()
261 return parse_bags(PKCS12_SAFEBAG_get0_safes(bag), pass, passlen, pkey, in parse_bag()
H A Dp12_npas.c24 static int newpass_bag(PKCS12_SAFEBAG *bag, const char *oldpass,
155 static int newpass_bag(PKCS12_SAFEBAG *bag, const char *oldpass, in newpass_bag() argument
165 if (PKCS12_SAFEBAG_get_nid(bag) != NID_pkcs8ShroudedKeyBag) in newpass_bag()
168 if ((p8 = PKCS8_decrypt_ex(bag->value.shkeybag, oldpass, -1, in newpass_bag()
171 X509_SIG_get0(bag->value.shkeybag, &shalg, NULL); in newpass_bag()
189 X509_SIG_free(bag->value.shkeybag); in newpass_bag()
190 bag->value.shkeybag = p8new; in newpass_bag()
H A Dp12_asn.c70 ADB_ENTRY(NID_certBag, ASN1_EXP(PKCS12_SAFEBAG, value.bag, PKCS12_BAGS, 0)),
71 ADB_ENTRY(NID_crlBag, ASN1_EXP(PKCS12_SAFEBAG, value.bag, PKCS12_BAGS, 0)),
72 ADB_ENTRY(NID_secretBag, ASN1_EXP(PKCS12_SAFEBAG, value.bag, PKCS12_BAGS, 0))
H A Dp12_local.h25 struct pkcs12_bag_st *bag; /* secret, crl and certbag */ member
/openssl/test/helpers/
H A Dpkcs12.c386 PKCS12_SAFEBAG *bag = NULL; in add_certbag() local
404 if (!TEST_ptr(bag)) { in add_certbag()
420 PKCS12_SAFEBAG *bag = NULL; in add_keybag() local
439 if (!TEST_ptr(bag)) { in add_keybag()
460 if (!TEST_ptr(bag)) { in add_secretbag()
554 const PKCS12_SAFEBAG *bag; in check_certbag() local
560 if (!TEST_ptr(bag)) { in check_certbag()
590 const PKCS12_SAFEBAG *bag; in check_keybag() local
596 if (!TEST_ptr(bag)) { in check_keybag()
648 const PKCS12_SAFEBAG *bag; in check_secretbag() local
[all …]
/openssl/doc/man3/
H A DPKCS12_SAFEBAG_get1_cert.pod17 const ASN1_TYPE *PKCS12_SAFEBAG_get0_attr(const PKCS12_SAFEBAG *bag,
19 const ASN1_OBJECT *PKCS12_SAFEBAG_get0_type(const PKCS12_SAFEBAG *bag);
20 int PKCS12_SAFEBAG_get_nid(const PKCS12_SAFEBAG *bag);
21 int PKCS12_SAFEBAG_get_bag_nid(const PKCS12_SAFEBAG *bag);
22 const ASN1_TYPE *PKCS12_SAFEBAG_get0_bag_obj(const PKCS12_SAFEBAG *bag);
24 X509_CRL *PKCS12_SAFEBAG_get1_cert_ex(const PKCS12_SAFEBAG *bag,
26 X509 *PKCS12_SAFEBAG_get1_cert(const PKCS12_SAFEBAG *bag);
27 X509_CRL *PKCS12_SAFEBAG_get1_crl_ex(const PKCS12_SAFEBAG *bag,
29 X509_CRL *PKCS12_SAFEBAG_get1_crl(const PKCS12_SAFEBAG *bag);
32 const X509_SIG *PKCS12_SAFEBAG_get0_pkcs8(const PKCS12_SAFEBAG *bag);
[all …]
H A DPKCS12_add_friendlyname_asc.pod13 int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name,
16 int PKCS12_add_friendlyname_utf8(PKCS12_SAFEBAG *bag, const char *name,
19 int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag,
33 I<bag> is the B<PKCS12_SAFEBAG> to add the attribute to.
H A DPKCS12_decrypt_skey.pod12 PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag,
14 PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey_ex(const PKCS12_SAFEBAG *bag,
21 PKCS12_decrypt_skey() Decrypt the PKCS#8 shrouded keybag contained within I<bag>
H A DPKCS12_add1_attr_by_NID.pod12 int PKCS12_add1_attr_by_NID(PKCS12_SAFEBAG *bag, int nid, int type,
14 int PKCS12_add1_attr_by_txt(PKCS12_SAFEBAG *bag, const char *attrname, int type,
19 These functions add a PKCS#12 Attribute to the Attribute Set of the B<bag>.
H A DPKCS12_SAFEBAG_set0_attrs.pod12 void PKCS12_SAFEBAG_set0_attrs(PKCS12_SAFEBAG *bag, STACK_OF(X509_ATTRIBUTE) *attrs);
17 PKCS#12 safeBag. I<bag> is the B<PKCS12_SAFEBAG> to assign the attributes to.
H A DPKCS12_add_CSPName_asc.pod11 int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name, int namelen);
17 I<bag> is the B<PKCS12_SAFEBAG> to add the attribute to.
H A DPKCS12_add_localkeyid.pod11 int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, const char *name,
19 I<bag> is the B<PKCS12_SAFEBAG> to add the attribute to.
H A DPKCS12_get_friendlyname.pod11 char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag);
18 I<bag> is the B<PKCS12_SAFEBAG> to retrieve the attribute from.
H A DPKCS12_SAFEBAG_get0_attrs.pod12 const STACK_OF(X509_ATTRIBUTE) *PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag);
20 PKCS#12 safeBag. I<bag> is the B<PKCS12_SAFEBAG> to retrieve the attributes from.
H A DPKCS12_create.pod19 typedef int PKCS12_create_cb(PKCS12_SAFEBAG *bag, void *cbarg);
101 A return of 0 is intended to mean to not add the bag after all.
/openssl/include/openssl/
H A Dpkcs12.h.in106 const ASN1_TYPE *PKCS12_SAFEBAG_get0_attr(const PKCS12_SAFEBAG *bag,
109 int PKCS12_SAFEBAG_get_nid(const PKCS12_SAFEBAG *bag);
110 int PKCS12_SAFEBAG_get_bag_nid(const PKCS12_SAFEBAG *bag);
115 X509 *PKCS12_SAFEBAG_get1_cert(const PKCS12_SAFEBAG *bag);
117 X509_CRL *PKCS12_SAFEBAG_get1_crl(const PKCS12_SAFEBAG *bag);
119 PKCS12_SAFEBAG_get0_safes(const PKCS12_SAFEBAG *bag);
190 int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name,
192 int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag,
201 char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag);
203 PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag);
[all …]
/openssl/apps/
H A Dpkcs12.c58 static int jdk_trust(PKCS12_SAFEBAG *bag, void *cbarg);
911 static int jdk_trust(PKCS12_SAFEBAG *bag, void *cbarg) in jdk_trust() argument
930 PKCS12_SAFEBAG_set0_attrs(bag, attrs); in jdk_trust()
999 int dump_certs_pkeys_bag(BIO *out, const PKCS12_SAFEBAG *bag, in dump_certs_pkeys_bag() argument
1010 attrs = PKCS12_SAFEBAG_get0_attrs(bag); in dump_certs_pkeys_bag()
1012 switch (PKCS12_SAFEBAG_get_nid(bag)) { in dump_certs_pkeys_bag()
1019 p8c = PKCS12_SAFEBAG_get0_p8inf(bag); in dump_certs_pkeys_bag()
1033 tp8 = PKCS12_SAFEBAG_get0_pkcs8(bag); in dump_certs_pkeys_bag()
1057 if (PKCS12_SAFEBAG_get0_attr(bag, NID_localKeyID)) { in dump_certs_pkeys_bag()
1065 if ((x509 = PKCS12_SAFEBAG_get1_cert(bag)) == NULL) in dump_certs_pkeys_bag()
[all …]
/openssl/demos/pkcs12/
H A Dpkread.c25 PKCS12_SAFEBAG *bag; in find_friendly_name() local
37 bag = sk_PKCS12_SAFEBAG_value(bags, m); in find_friendly_name()
38 name = PKCS12_get_friendlyname(bag); in find_friendly_name()
/openssl/test/
H A Dpkcs12_format_test.c753 PKCS12_SAFEBAG *bag = NULL; in test_set0_attrs() local
764 bag = sk_PKCS12_SAFEBAG_value(pb->bags, 0); in test_set0_attrs()
765 attrs = (STACK_OF(X509_ATTRIBUTE)*)PKCS12_SAFEBAG_get0_attrs(bag); in test_set0_attrs()
770 PKCS12_SAFEBAG_set0_attrs(bag, attrs); in test_set0_attrs()
771 attrs = (STACK_OF(X509_ATTRIBUTE)*)PKCS12_SAFEBAG_get0_attrs(bag); in test_set0_attrs()
H A Dpkcs12_api_test.c137 static int pkcs12_create_cb(PKCS12_SAFEBAG *bag, void *cbarg) in pkcs12_create_cb() argument

Completed in 33 milliseconds