OpenCoverage

t_crl.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/x509/t_crl.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4int X509_CRL_print_fp(FILE *fp, X509_CRL *x)-
5{-
6 BIO *b;-
7 int ret;-
8-
9 if ((
(b = BIO_new(B...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
b = BIO_new(BIO_s_file())) ==
(b = BIO_new(B...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
10 ((void *)0)
(b = BIO_new(B...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
11 ) {-
12 ERR_put_error(11,(147),(7),__FILE__,25);-
13 return
never executed: return 0;
0;
never executed: return 0;
0
14 }-
15 BIO_ctrl(b,106,0x00,(char *)(fp));-
16 ret = X509_CRL_print(b, x);-
17 BIO_free(b);-
18 return
never executed: return ret;
ret;
never executed: return ret;
0
19}-
20-
21-
22int X509_CRL_print(BIO *out, X509_CRL *x)-
23{-
24 return
executed 1838 times by 1 test: return X509_CRL_print_ex(out, x, 0);
Executed by:
  • libcrypto.so.1.1
X509_CRL_print_ex(out, x, 0);
executed 1838 times by 1 test: return X509_CRL_print_ex(out, x, 0);
Executed by:
  • libcrypto.so.1.1
1838
25}-
26-
27int X509_CRL_print_ex(BIO *out, X509_CRL *x, unsigned long nmflag)-
28{-
29 struct stack_st_X509_REVOKED *rev;-
30 X509_REVOKED *r;-
31 const X509_ALGOR *sig_alg;-
32 const ASN1_BIT_STRING *sig;-
33 long l;-
34 int i;-
35-
36 BIO_printf(out, "Certificate Revocation List (CRL):\n");-
37 l = X509_CRL_get_version(x);-
38 if (l >= 0
l >= 0Description
TRUEevaluated 1809 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 30 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& l <= 1
l <= 1Description
TRUEevaluated 1786 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 23 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
23-1809
39 BIO_printf(out, "%8sVersion %ld (0x%lx)\n", "", l + 1, (unsigned long)l);
executed 1786 times by 1 test: BIO_printf(out, "%8sVersion %ld (0x%lx)\n", "", l + 1, (unsigned long)l);
Executed by:
  • libcrypto.so.1.1
1786
40 else-
41 BIO_printf(out, "%8sVersion unknown (%ld)\n", "", l);
executed 53 times by 1 test: BIO_printf(out, "%8sVersion unknown (%ld)\n", "", l);
Executed by:
  • libcrypto.so.1.1
53
42 X509_CRL_get0_signature(x, &sig, &sig_alg);-
43 BIO_puts(out, " ");-
44 X509_signature_print(out, sig_alg, -
45 ((void *)0)-
46 );-
47 BIO_printf(out, "%8sIssuer: ", "");-
48 X509_NAME_print_ex(out, X509_CRL_get_issuer(x), 0, nmflag);-
49 BIO_puts(out, "\n");-
50 BIO_printf(out, "%8sLast Update: ", "");-
51 ASN1_TIME_print(out, X509_CRL_get0_lastUpdate(x));-
52 BIO_printf(out, "\n%8sNext Update: ", "");-
53 if (X509_CRL_get0_nextUpdate(x)
X509_CRL_get0_nextUpdate(x)Description
TRUEevaluated 111 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1728 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
111-1728
54 ASN1_TIME_print(out, X509_CRL_get0_nextUpdate(x));
executed 111 times by 1 test: ASN1_TIME_print(out, X509_CRL_get0_nextUpdate(x));
Executed by:
  • libcrypto.so.1.1
111
55 else-
56 BIO_printf(out, "NONE");
executed 1728 times by 1 test: BIO_printf(out, "NONE");
Executed by:
  • libcrypto.so.1.1
1728
57 BIO_printf(out, "\n");-
58-
59 X509V3_extensions_print(out, "CRL extensions",-
60 X509_CRL_get0_extensions(x), 0, 8);-
61-
62 rev = X509_CRL_get_REVOKED(x);-
63-
64 if (sk_X509_REVOKED_num(rev) > 0
sk_X509_REVOKED_num(rev) > 0Description
TRUEevaluated 267 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1572 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
267-1572
65 BIO_printf(out, "Revoked Certificates:\n");
executed 267 times by 1 test: BIO_printf(out, "Revoked Certificates:\n");
Executed by:
  • libcrypto.so.1.1
267
66 else-
67 BIO_printf(out, "No Revoked Certificates.\n");
executed 1572 times by 1 test: BIO_printf(out, "No Revoked Certificates.\n");
Executed by:
  • libcrypto.so.1.1
1572
68-
69 for (i = 0; i < sk_X509_REVOKED_num(rev)
i < sk_X509_REVOKED_num(rev)Description
TRUEevaluated 8472 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1839 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
1839-8472
70 r = sk_X509_REVOKED_value(rev, i);-
71 BIO_printf(out, " Serial Number: ");-
72 i2a_ASN1_INTEGER(out, X509_REVOKED_get0_serialNumber(r));-
73 BIO_printf(out, "\n Revocation Date: ");-
74 ASN1_TIME_print(out, X509_REVOKED_get0_revocationDate(r));-
75 BIO_printf(out, "\n");-
76 X509V3_extensions_print(out, "CRL entry extensions",-
77 X509_REVOKED_get0_extensions(r), 0, 8);-
78 }
executed 8472 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
8472
79 X509_signature_print(out, sig_alg, sig);-
80-
81 return
executed 1839 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 1839 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1839
82-
83}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2