aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Percival <robpercival@google.com>2016-03-04 19:07:25 +0000
committerRich Salz <rsalz@openssl.org>2016-03-09 13:07:09 -0500
commit6bea2a72a8bfe94bb7298374d1977b2ca580c415 (patch)
tree8628aa4419e784058241d496138c3a59fb7ab909
parent328f36c5c51994391363162b76c94819f9a12ae0 (diff)
downloadopenssl-6bea2a72a8bfe94bb7298374d1977b2ca580c415.zip
openssl-6bea2a72a8bfe94bb7298374d1977b2ca580c415.tar.gz
openssl-6bea2a72a8bfe94bb7298374d1977b2ca580c415.tar.bz2
Minor improvement to formatting of SCT output in s_client
Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
-rw-r--r--apps/s_client.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index cf238c7..c338b0c 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -2613,14 +2613,19 @@ static void print_stuff(BIO *bio, SSL *s, int full)
#ifndef OPENSSL_NO_CT
scts = SSL_get0_peer_scts(s);
- BIO_printf(bio, "---\nSCTs present (%i)\n---\n",
- scts ? sk_SCT_num(scts) : 0);
- SCT_LIST_print(scts, bio, 0, "\n---\n");
- BIO_printf(bio, "\n");
+ BIO_printf(bio, "---\nSCTs present (%i)\n",
+ scts != NULL ? sk_SCT_num(scts) : 0);
+
if (SSL_get_ct_validation_callback(s) == NULL) {
- BIO_printf(bio, "---\nWarning: CT validation is disabled, so not all "
+ BIO_printf(bio, "Warning: CT validation is disabled, so not all "
"SCTs may be displayed. Re-run with \"-requestct\".\n");
}
+
+ if (scts != NULL && sk_SCT_num(scts) > 0) {
+ BIO_printf(bio, "---\n");
+ SCT_LIST_print(scts, bio, 0, "\n---\n");
+ BIO_printf(bio, "\n");
+ }
#endif
BIO_printf(bio,