diff options
author | Filip Skokan <panva.ip@gmail.com> | 2021-01-26 20:21:14 +0300 |
---|---|---|
committer | Filip Skokan <panva.ip@gmail.com> | 2021-02-03 01:16:51 +0300 |
commit | a8d7de1efb1fc633d35277d398f57abc368cdede (patch) | |
tree | e91e33eb39e6f526465d3ec5e660f4b3c2ed4586 /doc/api/errors.md | |
parent | 211574b0c2b655651ccafc3b899e28b54c048eca (diff) |
crypto: add keyObject.export() 'jwk' format option
Adds [JWK](https://tools.ietf.org/html/rfc7517) keyObject.export format
option.
Supported key types: `ec`, `rsa`, `ed25519`, `ed448`, `x25519`, `x448`,
and symmetric keys, resulting in JWK `kty` (Key Type) values `EC`,
`RSA`, `OKP`, and `oct`.
`rsa-pss` is not supported since the JWK format does not support
PSS Parameters.
`EC` JWK curves supported are `P-256`, `secp256k1`, `P-384`, and `P-521`
PR-URL: https://github.com/nodejs/node/pull/37081
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'doc/api/errors.md')
-rw-r--r-- | doc/api/errors.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/api/errors.md b/doc/api/errors.md index 896a403188c..411e2a42210 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -919,6 +919,18 @@ added: v15.0.0 Initialization of an asynchronous crypto operation failed. +<a id="ERR_CRYPTO_JWK_UNSUPPORTED_CURVE"></a> +### `ERR_CRYPTO_JWK_UNSUPPORTED_CURVE` + +Key's Elliptic Curve is not registered for use in the +[JSON Web Key Elliptic Curve Registry][]. + +<a id="ERR_CRYPTO_JWK_UNSUPPORTED_KEY_TYPE"></a> +### `ERR_CRYPTO_JWK_UNSUPPORTED_KEY_TYPE` + +Key's Asymmetric Key Type is not registered for use in the +[JSON Web Key Types Registry][]. + <a id="ERR_CRYPTO_OPERATION_FAILED"></a> ### `ERR_CRYPTO_OPERATION_FAILED` <!-- YAML @@ -2716,6 +2728,8 @@ The native call from `process.cpuUsage` could not be processed. [ES Module]: esm.md [ICU]: intl.md#intl_internationalization_support +[JSON Web Key Elliptic Curve Registry]: https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve +[JSON Web Key Types Registry]: https://www.iana.org/assignments/jose/jose.xhtml#web-key-types [Node.js error codes]: #nodejs-error-codes [RFC 7230 Section 3]: https://tools.ietf.org/html/rfc7230#section-3 [Subresource Integrity specification]: https://www.w3.org/TR/SRI/#the-integrity-attribute |