From 8002d6a4e0e6929e04d105d552ef26c1538acc13 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 29 Mar 2019 11:55:24 -0400 Subject: [PATCH] crypto: use EVP_PKEY_X448 in GetEphemeralKeyInfo PR-URL: https://github.com/nodejs/node/pull/26988 Reviewed-By: Ben Noordhuis Reviewed-By: Daniel Bevenius Signed-off-by: Beth Griggs --- src/node_crypto.cc | 2 +- test/parallel/test-tls-client-getephemeralkeyinfo.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index b2cb9941d9f92a..30400c373901e4 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -2220,8 +2220,8 @@ void SSLWrap::GetEphemeralKeyInfo( .FromJust(); break; case EVP_PKEY_EC: - // TODO(shigeki) Add EVP_PKEY_X448. case EVP_PKEY_X25519: + case EVP_PKEY_X448: { const char* curve_name; if (kid == EVP_PKEY_EC) { diff --git a/test/parallel/test-tls-client-getephemeralkeyinfo.js b/test/parallel/test-tls-client-getephemeralkeyinfo.js index 8a9cc65a1cac25..12273515d8c7e6 100644 --- a/test/parallel/test-tls-client-getephemeralkeyinfo.js +++ b/test/parallel/test-tls-client-getephemeralkeyinfo.js @@ -57,3 +57,4 @@ test(2048, 'DH', undefined, 'DHE-RSA-AES128-GCM-SHA256'); test(256, 'ECDH', 'prime256v1', 'ECDHE-RSA-AES128-GCM-SHA256'); test(521, 'ECDH', 'secp521r1', 'ECDHE-RSA-AES128-GCM-SHA256'); test(253, 'ECDH', 'X25519', 'ECDHE-RSA-AES128-GCM-SHA256'); +test(448, 'ECDH', 'X448', 'ECDHE-RSA-AES128-GCM-SHA256');