From 247c14c040026252814c3d4e8cffb8ac8748180e 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 f10764c9e4b9b2..cc310f67d1187c 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1133,11 +1133,16 @@ bytes. This property is `undefined` for symmetric keys. ### 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])