summaryrefslogtreecommitdiffstats
path: root/crypto/ts
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2016-09-27 23:03:41 +0200
committerRich Salz <rsalz@openssl.org>2016-10-19 06:37:42 -0400
commit31dad404fd6854ec8dd697bcccfef1e8dba3faff (patch)
tree7795508918bf00b7908f697d175ef2cb31cd1b92 /crypto/ts
parent12d2ee211b2a4f489787aaf9aa758fe3db128304 (diff)
Add error checking, small nit on ouput
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1632)
Diffstat (limited to 'crypto/ts')
-rw-r--r--crypto/ts/ts_lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/ts/ts_lib.c b/crypto/ts/ts_lib.c
index 99c0580f2a..de36e0e084 100644
--- a/crypto/ts/ts_lib.c
+++ b/crypto/ts/ts_lib.c
@@ -57,9 +57,10 @@ int TS_ext_print_bio(BIO *bio, const STACK_OF(X509_EXTENSION) *extensions)
for (i = 0; i < n; i++) {
ex = X509v3_get_ext(extensions, i);
obj = X509_EXTENSION_get_object(ex);
- i2a_ASN1_OBJECT(bio, obj);
+ if (i2a_ASN1_OBJECT(bio, obj) < 0)
+ return 0;
critical = X509_EXTENSION_get_critical(ex);
- BIO_printf(bio, ": %s\n", critical ? "critical" : "");
+ BIO_printf(bio, ":%s\n", critical ? " critical" : "");
if (!X509V3_EXT_print(bio, ex, 0, 4)) {
BIO_printf(bio, "%4s", "");
ASN1_STRING_print(bio, X509_EXTENSION_get_data(ex));