diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2016-11-03 15:54:40 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2016-11-03 15:54:40 +0000 |
commit | 921c70b6094da3bbf3fc44ccf8d19c5185e8e0ef (patch) | |
tree | abdd9a468af61f1a7ebb3d9bdf186da59f3be1fb /usr.bin/nc/netcat.c | |
parent | 343222ee972cff5743db1e21466c0cda2f09dd14 (diff) |
make OCSP_URL only show up when an OCSP url is actually present in the cert
Diffstat (limited to 'usr.bin/nc/netcat.c')
-rw-r--r-- | usr.bin/nc/netcat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c index b827c18689e..6b05b3fdf78 100644 --- a/usr.bin/nc/netcat.c +++ b/usr.bin/nc/netcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.165 2016/11/03 15:52:10 beck Exp $ */ +/* $OpenBSD: netcat.c,v 1.166 2016/11/03 15:54:39 beck Exp $ */ /* * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -1538,7 +1538,8 @@ report_tls(struct tls * tls_ctx, char * host, char *tls_expectname) fprintf(stderr, "Cert Hash: %s\n", tls_peer_cert_hash(tls_ctx)); ocsp_url = tls_peer_ocsp_url(tls_ctx); - fprintf(stderr, "OCSP URL: %s\n", ocsp_url == NULL ? "" : ocsp_url); + if (ocsp_url != NULL) + fprintf(stderr, "OCSP URL: %s\n", ocsp_url); switch (tls_peer_ocsp_response_status(tls_ctx)) { case TLS_OCSP_RESPONSE_SUCCESSFUL: fprintf(stderr, "OCSP Stapling: %s\n", |