diff options
author | beck <> | 2016-11-03 15:52:10 +0000 |
---|---|---|
committer | beck <> | 2016-11-03 15:52:10 +0000 |
commit | c12936f0256b1ecc1e0fa1c549ea22aada972a01 (patch) | |
tree | 709f82b8106777c51cec0f6dd158ac8be3d30f4d /src | |
parent | b55a697c676bec213476fdf1525e9291c5d4aaf6 (diff) | |
download | openbsd-c12936f0256b1ecc1e0fa1c549ea22aada972a01.tar.gz openbsd-c12936f0256b1ecc1e0fa1c549ea22aada972a01.tar.bz2 openbsd-c12936f0256b1ecc1e0fa1c549ea22aada972a01.zip |
Make OCSP Stapling: only appear if there is stapling info present.
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/nc/netcat.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index 64e77a8b52..b827c18689 100644 --- a/src/usr.bin/nc/netcat.c +++ b/src/usr.bin/nc/netcat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: netcat.c,v 1.164 2016/11/02 15:18:42 beck Exp $ */ | 1 | /* $OpenBSD: netcat.c,v 1.165 2016/11/03 15:52:10 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> | 3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> |
4 | * Copyright (c) 2015 Bob Beck. All rights reserved. | 4 | * Copyright (c) 2015 Bob Beck. All rights reserved. |
@@ -1539,10 +1539,9 @@ report_tls(struct tls * tls_ctx, char * host, char *tls_expectname) | |||
1539 | tls_peer_cert_hash(tls_ctx)); | 1539 | tls_peer_cert_hash(tls_ctx)); |
1540 | ocsp_url = tls_peer_ocsp_url(tls_ctx); | 1540 | ocsp_url = tls_peer_ocsp_url(tls_ctx); |
1541 | fprintf(stderr, "OCSP URL: %s\n", ocsp_url == NULL ? "" : ocsp_url); | 1541 | fprintf(stderr, "OCSP URL: %s\n", ocsp_url == NULL ? "" : ocsp_url); |
1542 | fprintf(stderr, "OCSP Stapling:"); | ||
1543 | switch (tls_peer_ocsp_response_status(tls_ctx)) { | 1542 | switch (tls_peer_ocsp_response_status(tls_ctx)) { |
1544 | case TLS_OCSP_RESPONSE_SUCCESSFUL: | 1543 | case TLS_OCSP_RESPONSE_SUCCESSFUL: |
1545 | fprintf(stderr, " %s\n", | 1544 | fprintf(stderr, "OCSP Stapling: %s\n", |
1546 | tls_peer_ocsp_result(tls_ctx) == NULL ? "" : | 1545 | tls_peer_ocsp_result(tls_ctx) == NULL ? "" : |
1547 | tls_peer_ocsp_result(tls_ctx)); | 1546 | tls_peer_ocsp_result(tls_ctx)); |
1548 | fprintf(stderr, | 1547 | fprintf(stderr, |
@@ -1561,10 +1560,9 @@ report_tls(struct tls * tls_ctx, char * host, char *tls_expectname) | |||
1561 | t != -1 ? ctime(&t) : "\n"); | 1560 | t != -1 ? ctime(&t) : "\n"); |
1562 | break; | 1561 | break; |
1563 | case -1: | 1562 | case -1: |
1564 | fprintf(stderr, "\n"); | ||
1565 | break; | 1563 | break; |
1566 | default: | 1564 | default: |
1567 | fprintf(stderr, " failure - response_status %d (%s)\n", | 1565 | fprintf(stderr, "OCSP Stapling: failure - response_status %d (%s)\n", |
1568 | tls_peer_ocsp_response_status(tls_ctx), | 1566 | tls_peer_ocsp_response_status(tls_ctx), |
1569 | tls_peer_ocsp_result(tls_ctx) == NULL ? "" : | 1567 | tls_peer_ocsp_result(tls_ctx) == NULL ? "" : |
1570 | tls_peer_ocsp_result(tls_ctx)); | 1568 | tls_peer_ocsp_result(tls_ctx)); |