Lines Matching refs:bag
64 static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags, PKCS12_SAFEBAG *bag);
73 PKCS12_SAFEBAG *bag = NULL; in PKCS12_create() local
103 bag = PKCS12_add_cert(&bags, cert); in PKCS12_create()
104 if(name && !PKCS12_add_friendlyname(bag, name, -1)) in PKCS12_create()
106 if(keyidlen && !PKCS12_add_localkeyid(bag, keyid, keyidlen)) in PKCS12_create()
126 bag = PKCS12_add_key(&bags, pkey, keytype, iter, nid_key, pass); in PKCS12_create()
128 if (!bag) in PKCS12_create()
136 if (!X509at_add1_attr(&bag->attrib, cspattr)) in PKCS12_create()
140 if(name && !PKCS12_add_friendlyname(bag, name, -1)) in PKCS12_create()
142 if(keyidlen && !PKCS12_add_localkeyid(bag, keyid, keyidlen)) in PKCS12_create()
178 PKCS12_SAFEBAG *bag = NULL; in PKCS12_add_cert() local
185 if(!(bag = PKCS12_x5092certbag(cert))) in PKCS12_add_cert()
194 if(name && !PKCS12_add_friendlyname(bag, name, namelen)) in PKCS12_add_cert()
199 if(keyid && !PKCS12_add_localkeyid(bag, keyid, keyidlen)) in PKCS12_add_cert()
202 if (!pkcs12_add_bag(pbags, bag)) in PKCS12_add_cert()
205 return bag; in PKCS12_add_cert()
209 if (bag) in PKCS12_add_cert()
210 PKCS12_SAFEBAG_free(bag); in PKCS12_add_cert()
221 PKCS12_SAFEBAG *bag = NULL; in PKCS12_add_key() local
231 bag = PKCS12_MAKE_SHKEYBAG(nid_key, pass, -1, NULL, 0, iter, p8); in PKCS12_add_key()
235 bag = PKCS12_MAKE_KEYBAG(p8); in PKCS12_add_key()
237 if(!bag) in PKCS12_add_key()
240 if (!pkcs12_add_bag(pbags, bag)) in PKCS12_add_key()
243 return bag; in PKCS12_add_key()
247 if (bag) in PKCS12_add_key()
248 PKCS12_SAFEBAG_free(bag); in PKCS12_add_key()
300 static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags, PKCS12_SAFEBAG *bag) in pkcs12_add_bag() argument
315 if (!sk_PKCS12_SAFEBAG_push(*pbags, bag)) in pkcs12_add_bag()