From c28900990a77bcd3b9a96237867617339659a80a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 8 Jan 2017 17:58:19 +0900 Subject: [PATCH] h2load: Show custom server temp key such as X25519 --- src/h2load.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/h2load.cc b/src/h2load.cc index 59917eac..24fcc689 100644 --- a/src/h2load.cc +++ b/src/h2load.cc @@ -595,7 +595,8 @@ void print_server_tmp_key(SSL *ssl) { std::cout << "Server Temp Key: "; - switch (EVP_PKEY_id(key)) { + auto pkey_id = EVP_PKEY_id(key); + switch (pkey_id) { case EVP_PKEY_RSA: std::cout << "RSA " << EVP_PKEY_bits(key) << " bits" << std::endl; break; @@ -615,6 +616,10 @@ void print_server_tmp_key(SSL *ssl) { << std::endl; break; } + default: + std::cout << OBJ_nid2sn(pkey_id) << " " << EVP_PKEY_bits(key) << " bits" + << std::endl; + break; } #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L }