line |
true |
false |
branch |
67
|
1 |
0 |
if (!buf || !ne_types || !ne_values || !mval) |
|
1 |
0 |
if (!buf || !ne_types || !ne_values || !mval) |
|
1 |
0 |
if (!buf || !ne_types || !ne_values || !mval) |
|
0 |
1 |
if (!buf || !ne_types || !ne_values || !mval) |
73
|
0 |
1 |
if (*subject != '/') |
83
|
3 |
1 |
while (*sp) |
87
|
7 |
0 |
while (*sp) |
89
|
0 |
7 |
if (*sp == '\\') /* is there anything to escape in the type...? */ |
91
|
0 |
0 |
if (*++sp) |
99
|
3 |
4 |
else if (*sp == '=') |
108
|
0 |
3 |
if (!*sp) |
114
|
10 |
1 |
while (*sp) |
116
|
0 |
10 |
if (*sp == '\\') |
118
|
0 |
0 |
if (*++sp) |
126
|
2 |
8 |
else if (*sp == '/') |
133
|
0 |
8 |
else if (*sp == '+' && multirdn) |
|
0 |
0 |
else if (*sp == '+' && multirdn) |
147
|
0 |
1 |
if (!(n = X509_NAME_new())) |
150
|
3 |
1 |
for (i = 0; i < ne_num; i++) |
152
|
0 |
3 |
if (!*ne_values[i]) |
158
|
0 |
3 |
if (!X509_NAME_add_entry_by_txt(n, ne_types[i], chtype, (unsigned char*)ne_values[i], -1,-1,mval[i])) |
170
|
0 |
0 |
if (ne_values) |
172
|
0 |
0 |
if (ne_types) |
174
|
0 |
0 |
if (buf) |
176
|
0 |
0 |
if (mval) |
191
|
0 |
5 |
if (!ex) |
209
|
0 |
1 |
if (!ex) |
221
|
0 |
4 |
CHECK_NEW(pkcs10, 1, pkcs10Data); |
227
|
0 |
4 |
return sv_bless( |
238
|
133 |
183 |
if (m == BIO_CB_WRITE) { |
243
|
4 |
312 |
if (m == BIO_CB_PUTS) { |
273
|
0 |
0 |
return BIO_new_file(SvPV(filename, l), "wb"); |
284
|
0 |
14 |
if (!sv) sv = &PL_sv_undef; |
297
|
0 |
1 |
if (!(n = parse_name(subject, chtype, multirdn))) |
300
|
0 |
1 |
if (!X509_REQ_set_subject_name(req, n)) |
339
|
6 |
1 |
for (i = 0; (name = Crypt__OpenSSL__PKCS10__const[i].n); i++) { |
352
|
0 |
2 |
char *classname = SvPVutf8_nolen(class); |
356
|
0 |
2 |
if (!RAND_status()) |
360
|
0 |
2 |
if ((x=X509_REQ_new()) == NULL) |
375
|
0 |
2 |
if (bne == NULL) |
378
|
0 |
2 |
if (BN_set_word(bne, RSA_F4) != 1) |
381
|
0 |
2 |
if ((pk=EVP_PKEY_new()) == NULL) |
384
|
0 |
2 |
if (!RSA_generate_key_ex(rsa, keylen, bne, NULL)) |
387
|
0 |
2 |
if (!EVP_PKEY_assign_RSA(pk,rsa)) |
392
|
0 |
2 |
if (!X509_REQ_sign(x,pk,EVP_sha256())) |
409
|
3 |
1 |
if (pkcs10->pk) EVP_PKEY_free(pkcs10->pk); pkcs10->pk = 0; |
410
|
1 |
3 |
if (pkcs10->rsa) *pkcs10->rsa = 0; |
411
|
4 |
0 |
if (pkcs10->req) X509_REQ_free(pkcs10->req); pkcs10->req = 0; |
430
|
0 |
1 |
char *classname = SvPVutf8_nolen(class); |
435
|
1 |
0 |
keyString = SvPV(priv, keylen); |
437
|
0 |
1 |
if (bio == NULL) { |
443
|
0 |
1 |
if (pk == NULL) { |
447
|
0 |
1 |
if ((x=X509_REQ_new()) == NULL) |
450
|
1 |
0 |
rsa = (Crypt__OpenSSL__RSA *) SvIV(SvRV(p_rsa)); |
453
|
0 |
1 |
if (!X509_REQ_sign(x,pk,EVP_sha256())) |
470
|
0 |
1 |
if (!RETVAL) |
490
|
0 |
3 |
if (pkey == NULL) { |
498
|
3 |
0 |
if (type == EVP_PKEY_RSA) { |
500
|
0 |
0 |
} else if (type == EVP_PKEY_DSA) { |
503
|
0 |
0 |
} else if ( type == EVP_PKEY_EC ) { |
531
|
0 |
3 |
if(!pkey) |
535
|
0 |
3 |
if (type == EVP_PKEY_DSA) { |
538
|
3 |
0 |
} else if (type == EVP_PKEY_RSA) { |
541
|
0 |
0 |
} else if ( type == EVP_PKEY_EC ) { |
561
|
3 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
3 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
0 |
3 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
0 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
563
|
0 |
3 |
if(items > 1) { |
571
|
0 |
3 |
if(!PEM_write_bio_X509_REQ(bio,pkcs10->req)) |
591
|
0 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
0 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
0 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
|
0 |
0 |
if((ix != 1 && items > 1) || (ix == 1 && items != 2)) |
593
|
0 |
0 |
if(items > 1) { |
599
|
0 |
0 |
if(!pkcs10->pk) |
604
|
0 |
0 |
if(!PEM_write_bio_PrivateKey(bio,pkcs10->pk,NULL,NULL,0,NULL,NULL)) |
623
|
1 |
0 |
subj = SvPV(subj_SV, subj_length); |
625
|
0 |
1 |
RETVAL = build_subject(pkcs10->req, subj, utf8 ? MBSTRING_UTF8 : MBSTRING_ASC, 0); |
626
|
0 |
1 |
if (!RETVAL) |
643
|
4 |
0 |
ext = SvPV(ext_SV, ext_length); |
645
|
1 |
3 |
if(!pkcs10->exts) |
649
|
0 |
4 |
if (!RETVAL) |
668
|
1 |
0 |
oid = SvPV(oid_SV, ext_length); |
669
|
1 |
0 |
ext = SvPV(ext_SV, ext_length); |
671
|
0 |
1 |
if(!pkcs10->exts) |
674
|
0 |
1 |
if ((nid = OBJ_create(oid, oid, oid)) == NID_undef) |
678
|
0 |
1 |
if (!RETVAL) |
698
|
1 |
0 |
oid = SvPV(oid_SV, ext_length); |
699
|
1 |
0 |
ext = SvPV(ext_SV, ext_length); |
701
|
0 |
1 |
if(!pkcs10->exts) |
704
|
0 |
1 |
if ((nid = OBJ_create(oid, oid, oid)) == NID_undef) |
709
|
0 |
1 |
if (!RETVAL) |
720
|
1 |
0 |
if(pkcs10->exts) { |
723
|
0 |
1 |
if (!RETVAL) |
726
|
1 |
0 |
if(pkcs10->exts) |
747
|
2 |
0 |
filename = SvPV(filename_SV, filename_length); |
749
|
1 |
1 |
if (fp == NULL) { |
779
|
8 |
0 |
if (pkcs10->req != NULL) { |
780
|
4 |
4 |
if (ix == 1) { |
783
|
4 |
0 |
} else if (ix == 2 ) { |