| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/x509/t_crl.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | int X509_CRL_print_fp(FILE *fp, X509_CRL *x) | - | ||||||||||||
| 5 | { | - | ||||||||||||
| 6 | BIO *b; | - | ||||||||||||
| 7 | int ret; | - | ||||||||||||
| 8 | - | |||||||||||||
| 9 | if ((
| 0 | ||||||||||||
| 10 | ((void *)0)
| 0 | ||||||||||||
| 11 | ) { | - | ||||||||||||
| 12 | ERR_put_error(11,(147),(7),__FILE__,25); | - | ||||||||||||
| 13 | return never executed: 0;return 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: ret;return ret;never executed: return ret; | 0 | ||||||||||||
| 19 | } | - | ||||||||||||
| 20 | - | |||||||||||||
| 21 | - | |||||||||||||
| 22 | int X509_CRL_print(BIO *out, X509_CRL *x) | - | ||||||||||||
| 23 | { | - | ||||||||||||
| 24 | return executed 1838 times by 1 test: X509_CRL_print_ex(out, x, 0);return X509_CRL_print_ex(out, x, 0);Executed by:
executed 1838 times by 1 test: return X509_CRL_print_ex(out, x, 0);Executed by:
| 1838 | ||||||||||||
| 25 | } | - | ||||||||||||
| 26 | - | |||||||||||||
| 27 | int 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
| 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:
| 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:
| 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)
| 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:
| 111 | ||||||||||||
| 55 | else | - | ||||||||||||
| 56 | BIO_printf(out, "NONE"); executed 1728 times by 1 test: BIO_printf(out, "NONE");Executed by:
| 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
| 267-1572 | ||||||||||||
| 65 | BIO_printf(out, "Revoked Certificates:\n"); executed 267 times by 1 test: BIO_printf(out, "Revoked Certificates:\n");Executed by:
| 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:
| 1572 | ||||||||||||
| 68 | - | |||||||||||||
| 69 | for (i = 0; i < sk_X509_REVOKED_num(rev)
| 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 blockExecuted by:
| 8472 | ||||||||||||
| 79 | X509_signature_print(out, sig_alg, sig); | - | ||||||||||||
| 80 | - | |||||||||||||
| 81 | return executed 1839 times by 1 test: 1;return 1;Executed by:
executed 1839 times by 1 test: return 1;Executed by:
| 1839 | ||||||||||||
| 82 | - | |||||||||||||
| 83 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |