crypto: add key type 'dh'
The new key type 'dh' corresponds to EVP_PKEY_DH. PR-URL: https://github.com/nodejs/node/pull/31178 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This commit is contained in:
parent
f0d2df41f8
commit
c9e386c00f
@ -1232,6 +1232,9 @@ passing keys as strings or `Buffer`s due to improved security features.
|
||||
<!-- YAML
|
||||
added: v11.6.0
|
||||
changes:
|
||||
- version: REPLACEME
|
||||
pr-url: https://github.com/nodejs/node/pull/31178
|
||||
description: Added support for `'dh'`.
|
||||
- version: v12.0.0
|
||||
pr-url: https://github.com/nodejs/node/pull/26960
|
||||
description: Added support for `'rsa-pss'`
|
||||
@ -1260,6 +1263,7 @@ types are:
|
||||
* `'x448'` (OID 1.3.101.111)
|
||||
* `'ed25519'` (OID 1.3.101.112)
|
||||
* `'ed448'` (OID 1.3.101.113)
|
||||
* `'dh'` (OID 1.2.840.113549.1.3.1)
|
||||
|
||||
This property is `undefined` for unrecognized `KeyObject` types and symmetric
|
||||
keys.
|
||||
|
@ -192,6 +192,7 @@ constexpr size_t kFsStatsBufferLength =
|
||||
V(commonjs_string, "commonjs") \
|
||||
V(config_string, "config") \
|
||||
V(constants_string, "constants") \
|
||||
V(crypto_dh_string, "dh") \
|
||||
V(crypto_dsa_string, "dsa") \
|
||||
V(crypto_ec_string, "ec") \
|
||||
V(crypto_ed25519_string, "ed25519") \
|
||||
|
@ -3900,6 +3900,8 @@ Local<Value> KeyObject::GetAsymmetricKeyType() const {
|
||||
return env()->crypto_rsa_pss_string();
|
||||
case EVP_PKEY_DSA:
|
||||
return env()->crypto_dsa_string();
|
||||
case EVP_PKEY_DH:
|
||||
return env()->crypto_dh_string();
|
||||
case EVP_PKEY_EC:
|
||||
return env()->crypto_ec_string();
|
||||
case EVP_PKEY_ED25519:
|
||||
|
Loading…
x
Reference in New Issue
Block a user