line |
true |
false |
branch |
50
|
0 |
2 |
if (!strncmp(keyString, "----", 4)) { |
52
|
0 |
0 |
CHECK_OPEN_SSL(stringBIO = BIO_new_mem_buf(keyString, strlen(keyString))); |
56
|
0 |
2 |
CHECK_OPEN_SSL(stringBIO = BIO_new_file(keyString, "r")); |
64
|
0 |
2 |
CHECK_OPEN_SSL(pkey); |
75
|
0 |
2 |
if (!strncmp(keyString, "----", 4)) { |
76
|
0 |
0 |
CHECK_OPEN_SSL(stringBIO = BIO_new_mem_buf(keyString, strlen(keyString))); |
78
|
0 |
2 |
CHECK_OPEN_SSL(stringBIO = BIO_new_file(keyString, "r")); |
82
|
2 |
2 |
for (i = 0; i < sk_X509_INFO_num(xis); i++) { |
84
|
2 |
0 |
if (xi->x509 != NULL && stack != NULL) { |
|
2 |
0 |
if (xi->x509 != NULL && stack != NULL) { |
85
|
0 |
2 |
CHECK_OPEN_SSL(xi->x509); |
86
|
0 |
2 |
if (!sk_X509_push(stack, xi->x509)) |
103
|
37 |
55 |
if (m == BIO_CB_WRITE) { |
108
|
0 |
92 |
if (m == BIO_CB_PUTS) { |
140
|
0 |
9 |
if (!sv) sv = &PL_sv_undef; |
148
|
0 |
0 |
if (sv) sv_free(sv); |
162
|
3 |
0 |
return SvPV(sv, l); |
177
|
0 |
0 |
if (options & NOKEYS) return 1; |
181
|
0 |
0 |
if (!(pkey = EVP_PKCS82PKEY (p8c))) return 0; |
191
|
2 |
2 |
if (options & NOKEYS) return 1; |
193
|
0 |
2 |
if (!(p8 = PKCS12_decrypt_skey(bag, pass, passlen))) |
196
|
0 |
2 |
if (!(pkey = EVP_PKCS82PKEY (p8))) { |
211
|
4 |
4 |
if (options & NOCERTS) return 1; |
213
|
2 |
2 |
if (PKCS12_SAFEBAG_get0_attr(bag, NID_localKeyID)) { |
215
|
0 |
2 |
if (options & CACERTS) return 1; |
217
|
2 |
0 |
} else if (options & CLCERTS) { |
222
|
0 |
2 |
if (M_PKCS12_cert_bag_type(bag) != NID_x509Certificate) return 1; |
224
|
0 |
2 |
if (!(x509 = PKCS12_certbag2x509(bag))) return 0; |
240
|
12 |
8 |
for (i = 0; i < sk_PKCS12_SAFEBAG_num(bags); i++) { |
242
|
0 |
12 |
if (!dump_certs_pkeys_bag (bio, sk_PKCS12_SAFEBAG_value (bags, i), pass, passlen, options, pempass)) { |
258
|
0 |
4 |
if ((asafes = PKCS12_unpack_authsafes(p12)) == NULL) { |
263
|
8 |
4 |
for (i = 0; i < sk_PKCS7_num(asafes); i++) { |
269
|
4 |
4 |
if (bagnid == NID_pkcs7_data) { |
273
|
4 |
0 |
} else if (bagnid == NID_pkcs7_encrypted) { |
281
|
0 |
8 |
if (!bags) return 0; |
283
|
0 |
8 |
if (!dump_certs_pkeys_bags(bio, bags, pass, passlen, options, pempass)) { |
320
|
15 |
3 |
for (i = 0; (name = Crypt__OpenSSL__PKCS12__const[i].n); i++) { |
331
|
0 |
0 |
if ((RETVAL = PKCS12_new()) == NULL) { |
353
|
0 |
13 |
SvGETMAGIC(string); |
|
0 |
0 |
SvGETMAGIC(string); |
355
|
6 |
7 |
if (SvPOKp(string) || SvNOKp(string) || SvIOKp(string)) { |
|
5 |
1 |
if (SvPOKp(string) || SvNOKp(string) || SvIOKp(string)) { |
|
1 |
4 |
if (SvPOKp(string) || SvNOKp(string) || SvIOKp(string)) { |
356
|
3 |
6 |
if (ix == 1) { |
361
|
3 |
0 |
str_ptr = SvPV(string, str_len); |
365
|
2 |
4 |
if (SvUTF8(string)) { |
368
|
2 |
2 |
str_ptr = SvPV(string, str_len); |
374
|
7 |
0 |
if (!str_ptr || !str_len) croak("PKCS12_new_from: No string or file was passed."); |
|
0 |
7 |
if (!str_ptr || !str_len) croak("PKCS12_new_from: No string or file was passed."); |
376
|
3 |
4 |
if (ix == 1) { |
382
|
0 |
7 |
if (!bio) croak("Failed to create BIO"); |
385
|
3 |
4 |
if ((RETVAL = d2i_PKCS12_bio(bio, 0)) == NULL) { |
401
|
4 |
0 |
if (pkcs12) { |
428
|
0 |
2 |
if (!(i2d_PKCS12_bio(bio, pkcs12))) { |
445
|
0 |
6 |
if (!(PKCS12_verify_mac(pkcs12, pwd, strlen(pwd)))) { |
449
|
6 |
0 |
RETVAL = (PKCS12_verify_mac(pkcs12, pwd, strlen(pwd))) ? &PL_sv_yes : &PL_sv_no; |
462
|
0 |
4 |
if (!(PKCS12_newpass(pkcs12, oldpwd, newpwd))) { |
492
|
0 |
2 |
if (!p12) { |
497
|
0 |
2 |
if (!(fp = fopen(file, "wb"))) { |