tool: show if server sent OCSP staple
Change-Id: Ib9df4e8f797c9af3362354cc6716171fd65600de
Reviewed-on: https://boringssl-review.googlesource.com/12720
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/tool/transport_common.cc b/tool/transport_common.cc
index 7eed8ba..a4fcfb2 100644
--- a/tool/transport_common.cc
+++ b/tool/transport_common.cc
@@ -272,6 +272,13 @@
fprintf(stderr, " Client sent SNI: %s\n", host_name);
}
+ if (!SSL_is_server(ssl)) {
+ const uint8_t *ocsp_staple;
+ size_t ocsp_staple_len;
+ SSL_get0_ocsp_response(ssl, &ocsp_staple, &ocsp_staple_len);
+ fprintf(stderr, " OCSP staple: %s\n", ocsp_staple_len > 0 ? "yes" : "no");
+ }
+
// Print the server cert subject and issuer names.
bssl::UniquePtr<X509> peer(SSL_get_peer_certificate(ssl));
if (peer != nullptr) {