| line |
true |
false |
branch |
|
57
|
1 |
2 |
if (n != NULL) |
|
59
|
2 |
1 |
if (e != NULL) |
|
61
|
0 |
3 |
if (d != NULL) |
|
67
|
0 |
3 |
if (pkey->type != EVP_PKEY_RSA) |
|
75
|
0 |
0 |
if (psig != NULL) |
|
77
|
0 |
0 |
if (palg != NULL) |
|
95
|
0 |
0 |
if (p != NULL) |
|
97
|
0 |
0 |
if (q != NULL) |
|
99
|
0 |
0 |
if (g != NULL) |
|
106
|
0 |
0 |
if (pub_key != NULL) |
|
108
|
0 |
0 |
if (priv_key != NULL) |
|
114
|
0 |
0 |
if (pkey->type != EVP_PKEY_DSA) |
|
121
|
0 |
2 |
if (pkey->type != EVP_PKEY_EC) |
|
136
|
1180 |
1264 |
if (m == BIO_CB_WRITE) { |
|
141
|
0 |
2444 |
if (m == BIO_CB_PUTS) { |
|
173
|
0 |
43 |
if (!sv) sv = &PL_sv_undef; |
|
184
|
0 |
8 |
if (!sv_utf8_decode(sv)) { |
|
188
|
0 |
0 |
const U8* start = (U8 *) SvPV(sv, len); |
|
192
|
0 |
0 |
while ((start < end) && !is_utf8_string_loclen(start, len, &cur, 0)) { |
|
|
0 |
0 |
while ((start < end) && !is_utf8_string_loclen(start, len, &cur, 0)) { |
|
199
|
0 |
0 |
if (start < end) { |
|
230
|
0 |
0 |
return SvPV(sv, l); |
|
240
|
0 |
40 |
if (! sv_isa(rv, class) ) { |
|
265
|
1 |
10 |
if ( !(c > 0) ) { |
|
269
|
33 |
10 |
for (i = 0; i < c; i++) { |
|
274
|
0 |
33 |
if (ext == NULL) croak("Extension %d unavailable\n", i); |
|
278
|
33 |
0 |
if (no_name == 0 || no_name == 1) { |
|
|
30 |
3 |
if (no_name == 0 || no_name == 1) { |
|
283
|
3 |
0 |
} else if (no_name == 2) { |
|
289
|
0 |
33 |
if (! hv_store(RETVAL, key, r, rv, 0) ) croak("Error storing extension in hash\n"); |
|
322
|
48 |
4 |
for (i = 0; (name = Crypt__OpenSSL__X509__const[i].n); i++) { |
|
336
|
0 |
0 |
if ((RETVAL = X509_new()) == NULL) { |
|
340
|
0 |
0 |
if (!X509_set_version(RETVAL, 2)) { |
|
342
|
0 |
0 |
croak ("%s - can't X509_set_version()", SvPV_nolen(class)); |
|
366
|
17 |
0 |
cert = SvPV(string, len); |
|
368
|
16 |
1 |
if (ix == 1) { |
|
374
|
0 |
17 |
if (!bio) croak("%s: Failed to create BIO", SvPV_nolen(class)); |
|
|
0 |
0 |
if (!bio) croak("%s: Failed to create BIO", SvPV_nolen(class)); |
|
377
|
1 |
16 |
if (format == FORMAT_ASN1) { |
|
388
|
0 |
17 |
if (!RETVAL) croak("%s: failed to read X509 certificate.", SvPV_nolen(class)); |
|
|
0 |
0 |
if (!RETVAL) croak("%s: failed to read X509 certificate.", SvPV_nolen(class)); |
|
399
|
17 |
0 |
if (x509) X509_free(x509); x509 = 0; |
|
440
|
15 |
4 |
if (ix == 1 || ix == 2) { |
|
|
2 |
13 |
if (ix == 1 || ix == 2) { |
|
442
|
4 |
2 |
if (ix == 1) { |
|
454
|
3 |
10 |
} else if (ix == 3) { |
|
458
|
2 |
8 |
} else if (ix == 4) { |
|
462
|
0 |
8 |
} else if (ix == 5) { |
|
466
|
0 |
8 |
} else if (ix == 6) { |
|
470
|
2 |
6 |
} else if (ix == 7) { |
|
475
|
4 |
2 |
for (j = 0; j < sk_OPENSSL_STRING_num(emlst); j++) { |
|
476
|
2 |
2 |
BIO_printf(bio, "%s%s", (j ? " " : ""), sk_OPENSSL_STRING_value(emlst, j)); |
|
481
|
1 |
5 |
} else if (ix == 8) { |
|
485
|
2 |
3 |
} else if (ix == 9) { |
|
493
|
2 |
1 |
} else if ( ix == 10 ) { |
|
501
|
1 |
0 |
} else if ( ix == 11 ) { |
|
519
|
12 |
2 |
if (ix == 1) { |
|
545
|
0 |
0 |
for (i=0; i
|
|
567
|
0 |
1 |
if (format == FORMAT_PEM) { |
|
571
|
1 |
0 |
} else if (format == FORMAT_ASN1) { |
|
597
|
0 |
2 |
if (pkey == NULL) { |
|
619
|
0 |
1 |
if ( !ec_order ) { |
|
624
|
0 |
1 |
if ( (group = EC_KEY_get0_group(ec_pkey)) == NULL) { |
|
629
|
0 |
1 |
if (!EC_GROUP_get_order(group, ec_order, NULL)) { |
|
664
|
0 |
1 |
if (pkey == NULL) { |
|
668
|
1 |
0 |
if ( EVP_PKEY_base_id(pkey) == EVP_PKEY_EC ) { |
|
673
|
0 |
1 |
if ( (group = EC_KEY_get0_group(ec_pkey)) == NULL) { |
|
678
|
0 |
1 |
if ( nid == 0 ) { |
|
708
|
0 |
0 |
if (pkey == NULL) { |
|
716
|
0 |
0 |
if (pkey_id == EVP_PKEY_RSA) { |
|
725
|
0 |
0 |
} else if (pkey_id == EVP_PKEY_DSA) { |
|
733
|
0 |
0 |
} else if ( pkey_id == EVP_PKEY_EC ) { |
|
740
|
0 |
0 |
if ( (group = EC_KEY_get0_group(ec_pkey)) == NULL) { |
|
746
|
0 |
0 |
if ((pub_key = EC_POINT_point2bn(group, public_key, EC_KEY_get_conv_form(ec_pkey), NULL, NULL)) == NULL) { |
|
783
|
1 |
1 |
if (ix) |
|
785
|
0 |
1 |
if (pkey == NULL) { |
|
791
|
2 |
0 |
if (EVP_PKEY_base_id(pkey) == EVP_PKEY_RSA) { |
|
835
|
0 |
7 |
if (!X509_digest(x509, mds[ix], md, &n)) { |
|
842
|
217 |
7 |
for (i = 1; i < n; i++) { |
|
864
|
0 |
0 |
if (ASN1_UTCTIME_cmp_time_t(X509_get_notAfter(x509), now + (int)checkoffset) == -1) { |
|
887
|
0 |
0 |
if (pkey == NULL) { |
|
895
|
0 |
0 |
if (pkey_id == EVP_PKEY_RSA) { |
|
901
|
0 |
0 |
} else if (pkey_id == EVP_PKEY_DSA) { |
|
908
|
0 |
0 |
} else if (pkey_id == EVP_PKEY_EC ) { |
|
938
|
0 |
1 |
if(!pkey) |
|
942
|
0 |
1 |
if (pkey_id == EVP_PKEY_DSA) { |
|
945
|
0 |
1 |
} else if (pkey_id == EVP_PKEY_RSA) { |
|
948
|
1 |
0 |
} else if (pkey_id == EVP_PKEY_EC ) { |
|
980
|
0 |
0 |
if (!(c > 0)) { |
|
982
|
0 |
0 |
} else if (i >= c || i < 0) { |
|
|
0 |
0 |
} else if (i >= c || i < 0) { |
|
988
|
0 |
0 |
if (ext == NULL) { |
|
1021
|
0 |
3 |
if (ext == NULL) { |
|
1036
|
0 |
1 |
if (ext == NULL) { |
|
1055
|
0 |
3 |
if (ext == NULL) { |
|
1080
|
0 |
2 |
if (ext == NULL) { |
|
1106
|
1 |
0 |
if (strcmp(value, "ca") == 0) { |
|
1109
|
0 |
0 |
} else if (strcmp(value, "pathlen") == 0) { |
|
1159
|
1 |
0 |
if (nid == NID_key_usage) { |
|
1161
|
9 |
1 |
for (i = 0; i < 9; i++) { |
|
1166
|
0 |
0 |
} else if (nid == NID_netscape_cert_type) { |
|
1168
|
0 |
0 |
for (i = 0; i < 8; i++) { |
|
1194
|
0 |
0 |
while(sk_ASN1_OBJECT_num(extku) > 0) { |
|
1238
|
0 |
1 |
if (nid == NID_authority_key_identifier) { |
|
1243
|
1 |
0 |
} else if (nid == NID_subject_key_identifier) { |
|
1264
|
0 |
1 |
if (obj == NULL) { |
|
1284
|
0 |
0 |
if (obj == NULL) { |
|
1330
|
7 |
1 |
for (i = 0; i < c; i++) { |
|
1356
|
5 |
1 |
if (ix == 1 || ix == 3) { |
|
|
1 |
4 |
if (ix == 1 || ix == 3) { |
|
1358
|
2 |
2 |
} else if (ix == 4 || ix == 5) { |
|
|
0 |
2 |
} else if (ix == 4 || ix == 5) { |
|
1364
|
0 |
6 |
if (!nid) { |
|
1370
|
5 |
1 |
if (ix == 2 || ix == 3 || ix == 4) { /* has_entry */ |
|
|
4 |
1 |
if (ix == 2 || ix == 3 || ix == 4) { /* has_entry */ |
|
|
2 |
2 |
if (ix == 2 || ix == 3 || ix == 4) { /* has_entry */ |
|
1393
|
0 |
3 |
if (ix == 1) { |
|
1399
|
0 |
3 |
if (!nid) { |
|
1429
|
1 |
1 |
if (ix == 1 || ln) { |
|
|
0 |
1 |
if (ix == 1 || ln) { |
|
1463
|
1 |
1 |
if (ix == 1 || ln) { |
|
|
0 |
1 |
if (ix == 1 || ln) { |
|
1502
|
1 |
1 |
RETVAL = (X509_NAME_ENTRY_get_data(name_entry)->type == (ix == 1 ? asn1_type : ix)); |
|
1514
|
0 |
0 |
if (X509_NAME_ENTRY_get_data(name_entry)->type == V_ASN1_PRINTABLESTRING) { |
|
1517
|
0 |
0 |
} else if(X509_NAME_ENTRY_get_data(name_entry)->type == V_ASN1_IA5STRING) { |
|
1520
|
0 |
0 |
} else if(X509_NAME_ENTRY_get_data(name_entry)->type == V_ASN1_UTF8STRING) { |
|
1545
|
0 |
0 |
crl = SvPV(string, len); |
|
1547
|
0 |
0 |
if (ix == 1) { |
|
1553
|
0 |
0 |
if (!bio) { |
|
1554
|
0 |
0 |
croak("%s: Failed to create BIO", SvPV_nolen(class)); |
|
1557
|
0 |
0 |
if (format == FORMAT_ASN1) { |
|
1563
|
0 |
0 |
if (!RETVAL) { |
|
1564
|
0 |
0 |
croak("%s: failed to read X509 certificate.", SvPV_nolen(class)); |
|
1587
|
0 |
0 |
if (ix == 1) { |
|
1592
|
0 |
0 |
} else if (ix == 2) { |