Use new APIs in bssl tool for connection info.

Change-Id: I308b493d930621ae8e241b54db0faad667f01754
Reviewed-on: https://boringssl-review.googlesource.com/8761
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
David Benjamin 2016-07-13 15:50:26 -04:00 committed by CQ bot account: commit-bot@chromium.org
parent 54c217cc6b
commit 49864a56ec

View File

@ -188,10 +188,13 @@ void PrintConnectionInfo(const SSL *ssl) {
fprintf(stderr, " Resumed session: %s\n",
SSL_session_reused(ssl) ? "yes" : "no");
fprintf(stderr, " Cipher: %s\n", SSL_CIPHER_get_name(cipher));
if (SSL_CIPHER_is_ECDHE(cipher)) {
fprintf(stderr, " ECDHE curve: %s\n",
SSL_get_curve_name(
SSL_SESSION_get_key_exchange_info(SSL_get_session(ssl))));
uint16_t curve = SSL_get_curve_id(ssl);
if (curve != 0) {
fprintf(stderr, " ECDHE curve: %s\n", SSL_get_curve_name(curve));
}
unsigned dhe_bits = SSL_get_dhe_group_size(ssl);
if (dhe_bits != 0) {
fprintf(stderr, " DHE group size: %u bits\n", dhe_bits);
}
fprintf(stderr, " Secure renegotiation: %s\n",
SSL_get_secure_renegotiation_support(ssl) ? "yes" : "no");