diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/t_crl.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/t_crl.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/t_crl.c b/src/lib/libcrypto/asn1/t_crl.c index 39e04507ed..6449e7f199 100644 --- a/src/lib/libcrypto/asn1/t_crl.c +++ b/src/lib/libcrypto/asn1/t_crl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: t_crl.c,v 1.25 2024/05/02 15:33:59 tb Exp $ */ | 1 | /* $OpenBSD: t_crl.c,v 1.26 2024/05/03 02:52:00 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -96,9 +96,15 @@ X509_CRL_print(BIO *out, X509_CRL *x) | |||
| 96 | 96 | ||
| 97 | BIO_printf(out, "Certificate Revocation List (CRL):\n"); | 97 | BIO_printf(out, "Certificate Revocation List (CRL):\n"); |
| 98 | l = X509_CRL_get_version(x); | 98 | l = X509_CRL_get_version(x); |
| 99 | if (l < 0 || l == LONG_MAX) | 99 | if (l >= 0 && l <= 1) { |
| 100 | goto err; | 100 | if (BIO_printf(out, "%8sVersion: %lu (0x%lx)\n", |
| 101 | BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l + 1, l); | 101 | "", l + 1, l) <= 0) |
| 102 | goto err; | ||
| 103 | } else { | ||
| 104 | if (BIO_printf(out, "%8sVersion: unknown (%ld)\n", | ||
| 105 | "", l) <= 0) | ||
| 106 | goto err; | ||
| 107 | } | ||
| 102 | if (X509_signature_print(out, x->sig_alg, NULL) == 0) | 108 | if (X509_signature_print(out, x->sig_alg, NULL) == 0) |
| 103 | goto err; | 109 | goto err; |
| 104 | p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0); | 110 | p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0); |
