71 static int parse_bag(
PKCS12_SAFEBAG *bag,
const char *pass,
int passlen,
106 if(!pass || !*pass) {
127 if (!parse_pk12 (p12, pass, -1, pkey, ocerts))
135 if (pkey && *pkey && cert && !*cert)
179 static int parse_pk12(
PKCS12 *p12,
const char *pass,
int passlen,
187 if (!(asafes = PKCS12_unpack_authsafes (p12)))
return 0;
192 bags = PKCS12_unpack_p7data(p7);
194 bags = PKCS12_unpack_p7encdata(p7, pass, passlen);
200 if (!parse_bags(bags, pass, passlen, pkey, ocerts)) {
218 pass, passlen, pkey, ocerts))
224 static int parse_bag(
PKCS12_SAFEBAG *bag,
const char *pass,
int passlen,
254 PKCS8_PRIV_KEY_INFO_free(p8);
255 if (!(*pkey))
return 0;
292 return parse_bags(bag->
value.safes, pass, passlen,