diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/t_crl.c')
-rw-r--r-- | src/lib/libcrypto/asn1/t_crl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/t_crl.c b/src/lib/libcrypto/asn1/t_crl.c index e2f9d8b09e..67116361a5 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.15 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: t_crl.c,v 1.16 2014/07/12 16:33:25 miod 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 | */ |
@@ -94,8 +94,11 @@ X509_CRL_print(BIO *out, X509_CRL *x) | |||
94 | l = X509_CRL_get_version(x); | 94 | l = X509_CRL_get_version(x); |
95 | BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l + 1, l); | 95 | BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l + 1, l); |
96 | i = OBJ_obj2nid(x->sig_alg->algorithm); | 96 | i = OBJ_obj2nid(x->sig_alg->algorithm); |
97 | X509_signature_print(out, x->sig_alg, NULL); | 97 | if (X509_signature_print(out, x->sig_alg, NULL) == 0) |
98 | goto err; | ||
98 | p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0); | 99 | p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0); |
100 | if (p == NULL) | ||
101 | goto err; | ||
99 | BIO_printf(out, "%8sIssuer: %s\n", "", p); | 102 | BIO_printf(out, "%8sIssuer: %s\n", "", p); |
100 | free(p); | 103 | free(p); |
101 | BIO_printf(out, "%8sLast Update: ", ""); | 104 | BIO_printf(out, "%8sLast Update: ", ""); |
@@ -127,8 +130,11 @@ X509_CRL_print(BIO *out, X509_CRL *x) | |||
127 | X509V3_extensions_print(out, "CRL entry extensions", | 130 | X509V3_extensions_print(out, "CRL entry extensions", |
128 | r->extensions, 0, 8); | 131 | r->extensions, 0, 8); |
129 | } | 132 | } |
130 | X509_signature_print(out, x->sig_alg, x->signature); | 133 | if (X509_signature_print(out, x->sig_alg, x->signature) == 0) |
134 | goto err; | ||
131 | 135 | ||
132 | return 1; | 136 | return 1; |
133 | 137 | ||
138 | err: | ||
139 | return 0; | ||
134 | } | 140 | } |