| line |
true |
false |
branch |
|
75
|
3 |
0 |
if (!buf || !ne_types || !ne_values || !mval) |
|
|
3 |
0 |
if (!buf || !ne_types || !ne_values || !mval) |
|
|
3 |
0 |
if (!buf || !ne_types || !ne_values || !mval) |
|
|
0 |
3 |
if (!buf || !ne_types || !ne_values || !mval) |
|
81
|
0 |
3 |
if (*subject != '/') |
|
91
|
9 |
3 |
while (*sp) |
|
95
|
21 |
0 |
while (*sp) |
|
97
|
0 |
21 |
if (*sp == '\\') /* is there anything to escape in the type...? */ |
|
99
|
0 |
0 |
if (*++sp) |
|
107
|
9 |
12 |
else if (*sp == '=') |
|
116
|
0 |
9 |
if (!*sp) |
|
122
|
84 |
3 |
while (*sp) |
|
124
|
0 |
84 |
if (*sp == '\\') |
|
126
|
0 |
0 |
if (*++sp) |
|
134
|
6 |
78 |
else if (*sp == '/') |
|
141
|
0 |
78 |
else if (*sp == '+' && multirdn) |
|
|
0 |
0 |
else if (*sp == '+' && multirdn) |
|
155
|
0 |
3 |
if (!(n = X509_NAME_new())) |
|
158
|
9 |
3 |
for (i = 0; i < ne_num; i++) |
|
160
|
0 |
9 |
if (!*ne_values[i]) |
|
166
|
0 |
9 |
if (!X509_NAME_add_entry_by_txt(n, ne_types[i], chtype, (unsigned char*)ne_values[i], -1,-1,mval[i])) |
|
178
|
0 |
0 |
if (ne_values) |
|
180
|
0 |
0 |
if (ne_types) |
|
182
|
0 |
0 |
if (buf) |
|
184
|
0 |
0 |
if (mval) |
|
199
|
0 |
14 |
if (!ex) |
|
217
|
0 |
2 |
if (!ex) |
|
229
|
0 |
37 |
CHECK_NEW(pkcs10, 1, pkcs10Data); |
|
235
|
0 |
37 |
return sv_bless( |
|
246
|
1175 |
1285 |
if (m == BIO_CB_WRITE) { |
|
251
|
0 |
2460 |
if (m == BIO_CB_PUTS) { |
|
292
|
0 |
53 |
if (!sv) sv = &PL_sv_undef; |
|
305
|
0 |
3 |
if (!(n = parse_name(subject, chtype, multirdn))) |
|
308
|
0 |
3 |
if (!X509_REQ_set_subject_name(req, n)) |
|
335
|
0 |
0 |
if (!strcmp(curve, "secp192r1")) { |
|
338
|
0 |
0 |
} else if (!strcmp(curve, "secp256r1")) { |
|
344
|
0 |
0 |
if (nid == 0) |
|
347
|
0 |
0 |
if (nid == 0) { |
|
385
|
32 |
4 |
for (i = 0; (name = Crypt__OpenSSL__PKCS10__const[i].n); i++) { |
|
409
|
32 |
0 |
if (options && hv_exists(options, "type", strlen("type"))) { |
|
|
24 |
8 |
if (options && hv_exists(options, "type", strlen("type"))) { |
|
416
|
32 |
0 |
if (options && hv_exists(options, "curve", strlen("curve"))) { |
|
|
17 |
15 |
if (options && hv_exists(options, "curve", strlen("curve"))) { |
|
423
|
32 |
0 |
if (options && hv_exists(options, "hash", strlen("hash"))) { |
|
|
22 |
10 |
if (options && hv_exists(options, "hash", strlen("hash"))) { |
|
431
|
0 |
32 |
if (md == NULL) |
|
434
|
0 |
32 |
if (!RAND_status()) |
|
438
|
0 |
32 |
if ((x=X509_REQ_new()) == NULL) |
|
441
|
14 |
18 |
if (strncmp (type, "rsa", strlen("rsa")) == 0) { |
|
446
|
1 |
31 |
if (pk == NULL) |
|
447
|
0 |
1 |
croak ("%s: Unable to generate a %s key for %s", classname, |
|
531
|
0 |
31 |
if(!X509_REQ_set_version(x,0L)) |
|
533
|
0 |
31 |
if (!X509_REQ_set_pubkey(x,pk)) |
|
540
|
0 |
31 |
if (mctx == NULL) |
|
542
|
0 |
31 |
if (EVP_PKEY_get_default_digest_name(pk, def_md, sizeof(def_md)) == 2 |
|
543
|
0 |
0 |
&& strcmp(def_md, "UNDEF") == 0) { |
|
551
|
0 |
31 |
if(!X509_REQ_sign_ctx(x, mctx)) |
|
573
|
33 |
4 |
if (pkcs10->pk) EVP_PKEY_free(pkcs10->pk); pkcs10->pk = 0; |
|
574
|
2 |
35 |
if (pkcs10->rsa) *pkcs10->rsa = 0; |
|
575
|
37 |
0 |
if (pkcs10->req) X509_REQ_free(pkcs10->req); pkcs10->req = 0; |
|
602
|
2 |
0 |
if (options && hv_exists(options, "hash", strlen("hash"))) { |
|
|
1 |
1 |
if (options && hv_exists(options, "hash", strlen("hash"))) { |
|
610
|
0 |
2 |
if (md == NULL) |
|
616
|
0 |
2 |
if (bio == NULL) { |
|
622
|
0 |
2 |
if (pk == NULL) { |
|
626
|
0 |
2 |
if ((x=X509_REQ_new()) == NULL) |
|
632
|
0 |
2 |
if (!X509_REQ_sign(x, pk, md)) |
|
649
|
0 |
3 |
if (md == NULL) |
|
652
|
0 |
3 |
if (!RETVAL) |
|
672
|
0 |
7 |
if (pkey == NULL) { |
|
680
|
6 |
1 |
if (type == EVP_PKEY_RSA) { |
|
682
|
0 |
1 |
} else if (type == EVP_PKEY_DSA) { |
|
685
|
1 |
0 |
} else if ( type == EVP_PKEY_EC ) { |
|
713
|
0 |
7 |
if(!pkey) |
|
717
|
0 |
7 |
if (type == EVP_PKEY_DSA) { |
|
720
|
6 |
1 |
} else if (type == EVP_PKEY_RSA) { |
|
723
|
1 |
0 |
} else if ( type == EVP_PKEY_EC ) { |
|
743
|
33 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
|
33 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
|
0 |
33 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
|
0 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
745
|
0 |
33 |
if(items > 1) { |
|
753
|
0 |
33 |
if(!PEM_write_bio_X509_REQ(bio,pkcs10->req)) |
|
773
|
1 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
|
1 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
|
0 |
1 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
|
0 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
775
|
0 |
1 |
if(items > 1) { |
|
781
|
0 |
1 |
if(!pkcs10->pk) |
|
786
|
0 |
1 |
if(!PEM_write_bio_PrivateKey(bio,pkcs10->pk,NULL,NULL,0,NULL,NULL)) |
|
807
|
0 |
3 |
RETVAL = build_subject(pkcs10->req, subj, utf8 ? MBSTRING_UTF8 : MBSTRING_ASC, 0); |
|
808
|
0 |
3 |
if (!RETVAL) |
|
827
|
3 |
9 |
if(!pkcs10->exts) |
|
831
|
0 |
12 |
if (!RETVAL) |
|
855
|
0 |
4 |
if(!pkcs10->exts) |
|
857
|
0 |
4 |
if ((nid = OBJ_create(oid, oid, oid)) == NID_undef) |
|
858
|
0 |
0 |
croak ("%s: OBJ_create() for OID %s failed", |
|
861
|
2 |
2 |
if ( ix == 0 ) { |
|
873
|
0 |
4 |
if (!RETVAL) |
|
874
|
0 |
0 |
croak ("%s oid: %s, ext: %s", |
|
885
|
3 |
0 |
if(pkcs10->exts) { |
|
888
|
0 |
3 |
if (!RETVAL) |
|
891
|
3 |
0 |
if(pkcs10->exts) |
|
915
|
1 |
4 |
if (fp == NULL) { |
|
918
|
1 |
3 |
if (format == FORMAT_ASN1) |
|
949
|
12 |
0 |
if (pkcs10->req != NULL) { |
|
950
|
8 |
4 |
if (ix == 1) { |
|
953
|
4 |
0 |
} else if (ix == 2 ) { |