diff options
author | David Benjamin <davidben@chromium.org> | 2015-03-24 02:01:33 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-03-24 02:16:30 +0300 |
commit | 0570923ed21707984237f3e2e52447cf743d1e79 (patch) | |
tree | 7ee4ec565ce733005418df4d741b359d1c1378a5 /tool/transport_common.cc | |
parent | 0d4db50a54497cb37720f71f7e8a1e550e3c7282 (diff) |
Add additional features to bssl client.
This exposes the features needed to mimic Chrome's ClientHello, which is useful
in testing. Also use bssl_shim's scopers for SSL objects.
Change-Id: Icb88bb00c0a05c27610134d618f466a24f7f757a
Reviewed-on: https://boringssl-review.googlesource.com/4113
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'tool/transport_common.cc')
-rw-r--r-- | tool/transport_common.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tool/transport_common.cc b/tool/transport_common.cc index c05742e5..ddb41b6d 100644 --- a/tool/transport_common.cc +++ b/tool/transport_common.cc @@ -172,6 +172,17 @@ void PrintConnectionInfo(const SSL *ssl) { fprintf(stderr, " Cipher: %s\n", SSL_CIPHER_get_name(cipher)); fprintf(stderr, " Secure renegotiation: %s\n", SSL_get_secure_renegotiation_support(ssl) ? "yes" : "no"); + + const uint8_t *next_proto; + unsigned next_proto_len; + SSL_get0_next_proto_negotiated(ssl, &next_proto, &next_proto_len); + fprintf(stderr, " Next protocol negotiated: %.*s\n", next_proto_len, + next_proto); + + const uint8_t *alpn; + unsigned alpn_len; + SSL_get0_alpn_selected(ssl, &alpn, &alpn_len); + fprintf(stderr, " ALPN protocol: %.*s\n", alpn_len, alpn); } bool SocketSetNonBlocking(int sock, bool is_non_blocking) { |