From 25c8145be2c318900b22c29aa3e0fb4c4341731a Mon Sep 17 00:00:00 2001 From: Brian White Date: Tue, 26 Feb 2019 05:24:38 -0500 Subject: [PATCH] crypto: fix EdDSA support for KeyObject MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/26319 Fixes: https://github.com/nodejs/node/issues/26316 Reviewed-By: James M Snell Reviewed-By: Sam Roberts Reviewed-By: Ben Noordhuis Reviewed-By: Tobias Nießen Reviewed-By: Ujjwal Sharma --- doc/api/crypto.md | 7 +++++- src/env.h | 2 ++ src/node_crypto.cc | 4 +++ test/fixtures/test_ed25519_privkey.pem | 3 +++ test/fixtures/test_ed25519_pubkey.pem | 3 +++ test/fixtures/test_ed448_privkey.pem | 4 +++ test/fixtures/test_ed448_pubkey.pem | 4 +++ test/parallel/test-crypto-key-objects.js | 31 ++++++++++++++++++++++++ 8 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/test_ed25519_privkey.pem create mode 100644 test/fixtures/test_ed25519_pubkey.pem create mode 100644 test/fixtures/test_ed448_privkey.pem create mode 100644 test/fixtures/test_ed448_pubkey.pem diff --git a/doc/api/crypto.md b/doc/api/crypto.md index e2d797550d7f94..e708e918fb980e 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1128,11 +1128,16 @@ passing keys as strings or `Buffer`s due to improved security features. ### keyObject.asymmetricKeyType * {string} For asymmetric keys, this property represents the type of the embedded key -(`'rsa'`, `'dsa'` or `'ec'`). This property is `undefined` for symmetric keys. +(`'rsa'`, `'dsa'`, `'ec'`, `'ed25519'`, or `'ed448'`). +This property is `undefined` for symmetric keys. ### keyObject.export([options])