summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2016-11-03 15:54:39 +0000
committerbeck <beck@openbsd.org>2016-11-03 15:54:39 +0000
commit4f336f90e4a817cf143c87e67e2a80d506e8abde (patch)
treed406fa33e284e89cf42b37b098ca78abfd76f271
parentXXX match with installed sets (comp, x...)? (diff)
downloadwireguard-openbsd-4f336f90e4a817cf143c87e67e2a80d506e8abde.tar.xz
wireguard-openbsd-4f336f90e4a817cf143c87e67e2a80d506e8abde.zip
make OCSP_URL only show up when an OCSP url is actually present in the cert
-rw-r--r--usr.bin/nc/netcat.c5
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",