Daniel Bevenius
47d6cedd85
http2: add unknownProtocol timeout
...
This commit add a configuration options named unknownProtocolTimeout
which can be specified to set a value for the timeout in milliseconds
that a server should wait when an unknowProtocol is sent to it. When
this happens a timer will be started and the if the socket has not been
destroyed during that time the timer callback will destoy it.
Refs: https://hackerone.com/reports/1043360
CVE-ID: CVE-2021-22883
PR-URL: https://github.com/nodejs-private/node-private/pull/246
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-02-23 11:25:59 +00:00
James M Snell
f3eb224c83
perf_hooks: complete overhaul of the implementation
...
* Update the user timing implementation to conform to
User Timing Level 3.
* Reimplement user timing and timerify with pure JavaScript
implementations
* Simplify the C++ implementation for gc and http2 perf
* Runtime deprecate additional perf entry properties
in favor of the standard detail argument
* Disable the `buffered` option on PerformanceObserver,
all entries are queued and dispatched on setImmediate.
Only entries with active observers are buffered.
* This does remove the user timing and timerify
trace events. Because the trace_events are still
considered experimental, those can be removed without
a deprecation cycle. They are removed to improve
performance and reduce complexity.
Old: `perf_hooks/usertiming.js n=100000: 92,378.01249733355`
New: perf_hooks/usertiming.js n=100000: 270,393.5280638482`
PR-URL: https://github.com/nodejs/node/pull/37136
Refs: https://github.com/nodejs/diagnostics/issues/464
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-02-22 08:46:11 -08:00
Antoine du Hamel
9a105789b7
assert: refactor to avoid unsafe array iteration
...
PR-URL: https://github.com/nodejs/node/pull/37344
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-02-22 12:21:36 +01:00
Rich Trott
b461a1b125
doc,lib: prepare for stricter multi-line array linting
...
We're about to turn on a requirement for dangling commas.
PR-URL: https://github.com/nodejs/node/pull/37088
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-02-19 09:55:35 -08:00
Antoine du Hamel
08a2383a5e
crypto: refactor to avoid unsafe array iteration
...
PR-URL: https://github.com/nodejs/node/pull/37364
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-02-19 12:55:54 +01:00
Joyee Cheung
445108dc30
bootstrap: include v8 module into the builtin snapshot
...
PR-URL: https://github.com/nodejs/node/pull/36943
Fixes: https://github.com/nodejs/node/issues/35930
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-19 19:08:07 +08:00
Joyee Cheung
8aa9b772f4
bootstrap: include fs module into the builtin snapshot
...
PR-URL: https://github.com/nodejs/node/pull/36943
Fixes: https://github.com/nodejs/node/issues/35930
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-19 19:08:06 +08:00
Antoine du Hamel
05286b9dd4
lib: remove outdated todo comment
...
PR-URL: https://github.com/nodejs/node/pull/37396
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2021-02-19 10:25:19 +01:00
Antoine du Hamel
bb2d85f23e
module: improve support of data: URLs
...
Add support for loading modules using percent-encoded URLs.
PR-URL: https://github.com/nodejs/node/pull/37392
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-02-18 20:10:49 +01:00
Antoine du Hamel
b7a593d7ea
lib: add URI handling functions to primordials
...
PR-URL: https://github.com/nodejs/node/pull/37394
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-18 20:07:55 +01:00
Nitzan Uziely
38f6e5a789
stream: add AbortSignal to promisified pipeline
...
add support for AbortSignal to promisified pipeline.
Resolves: https://github.com/nodejs/node/issues/37321
PR-URL: https://github.com/nodejs/node/pull/37359
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-02-18 18:00:02 +02:00
cjihrig
9a2ac2c615
fs: use createDeferredPromise() in promises.watch()
...
This commit updates fsPromises.watch() to use the
createDeferredPromise() utility.
PR-URL: https://github.com/nodejs/node/pull/37386
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-02-17 23:33:38 -05:00
Michaël Zasso
bd4d9ef637
buffer: make Blob's constructor more spec-compliant
...
PR-URL: https://github.com/nodejs/node/pull/37361
Fixes: https://github.com/nodejs/node/issues/37352
Fixes: https://github.com/nodejs/node/issues/37356
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-17 14:08:28 +01:00
Michaël Zasso
6b289853b2
buffer: make Blob's slice method more spec-compliant
...
PR-URL: https://github.com/nodejs/node/pull/37361
Fixes: https://github.com/nodejs/node/issues/37335
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-17 14:07:57 +01:00
Darshan Sen
549a11c7b2
lib: simplify check in child_process
...
PR-URL: https://github.com/nodejs/node/pull/37367
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-02-16 20:45:33 +05:30
Antoine du Hamel
0f29587757
worker: refactor to avoid unsafe array iteration
...
PR-URL: https://github.com/nodejs/node/pull/37346
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-15 23:08:12 +01:00
Antoine du Hamel
708f049471
repl: refactor to avoid unsafe array iteration
...
PR-URL: https://github.com/nodejs/node/pull/37345
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-15 23:06:35 +01:00
Bradley Farias and James M Snell
f24e70736f
policy: fix cascade getting scope
...
PR-URL: https://github.com/nodejs/node/pull/37298
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Co-authored-by: James M Snell <jasnell@gmail.com >
2021-02-15 16:04:58 -06:00
Nitzan Uziely
83d6e63aee
events: change EventTarget handler exception behavior
...
Change the behavior of EventTarget, instead of emitting
'error' on handler exception, emit 'uncaughtException'.
Fixes: https://github.com/nodejs/node/issues/36770
PR-URL: https://github.com/nodejs/node/pull/37237
Fixes: https://github.com/nodejs/node/issues/36770
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-02-15 20:10:07 +02:00
James M Snell
98037294d2
fs: add fsPromises.watch()
...
An alternative to `fs.watch()` that returns an `AsyncIterator`
```js
const { watch } = require('fs/promises');
(async () => {
const ac = new AbortController();
const { signal } = ac;
setTimeout(() => ac.abort(), 10000);
const watcher = watch('file.txt', { signal });
for await (const { eventType, filename } of watcher) {
console.log(eventType, filename);
}
})()
```
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37179
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-02-15 07:52:13 -08:00
cjihrig
a7ba592483
buffer: add @@toStringTag to Blob
...
This commit adds the toStringTag to the Blob class to match
the behavior of Chrome and Firefox.
PR-URL: https://github.com/nodejs/node/pull/37336
Fixes: https://github.com/nodejs/node/issues/37337
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-15 10:35:32 -05:00
Antoine du Hamel
674614b3f5
module: remove module.createRequireFromPath
...
PR-URL: https://github.com/nodejs/node/pull/37201
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-15 07:03:08 -08:00
James M Snell
4a19cc8947
perf_hooks: introduce createHistogram
...
Adds a new `perf_hooks.createHistogram()` API for creating histogram
instances that allow user recording.
Makes Histogram instances cloneable via MessagePort. This allows, for
instance, an event loop delay monitor to be running on the main thread
while the histogram data can be monitored actively from a worker thread.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37155
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-02-14 13:03:49 -08:00
ExE Boss and Gerhard Stöbich
0dfc0f5702
url: fix definitions of URL/SearchParams methods and accessors
...
This fixes getter and setter names for the WHATWG URL classes, and fixes
a few other inconsistencies with browsers implementations.
Co-authored-by: Gerhard Stöbich <deb2001-github@yahoo.de >
PR-URL: https://github.com/nodejs/node/pull/36799
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2021-02-13 17:59:21 +01:00
ExE Boss
dd5b48ab94
url: move URLSearchParams method definitions
...
PR-URL: https://github.com/nodejs/node/pull/36799
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2021-02-13 17:57:15 +01:00
Sajal Khandelwal
7d5806eee3
async_hooks: set unhandledRejection async context
...
This commit now executes `process.on('unhandledRejection')` in the
async execution context of the concerned `Promise`.
PR-URL: https://github.com/nodejs/node/pull/37281
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-02-13 16:49:21 +02:00
bcoe
88d9268d08
errors: align source-map stacks with spec
...
Reformat stack traces when --enable-source-maps flag is set to format
more likely to fit https://github.com/tc39/proposal-error-stacks
PR-URL: https://github.com/nodejs/node/pull/37252
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ian Sutherland <ian@iansutherland.ca >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2021-02-12 14:09:35 -08:00
Nitzan Uziely
2272713df0
child_process: fix bad abort signal leak
...
Move abort signal validation to before spawn is executed
so that the file is not leaked.
PR-URL: https://github.com/nodejs/node/pull/37257
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-02-12 23:38:25 +02:00
zhangyongsheng
aecd5ebf49
module: only set cache when finding module succeeds
...
PR-URL: https://github.com/nodejs/node/pull/36642
Fixes: https://github.com/nodejs/node/issues/36638
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-12 22:08:40 +08:00
raisinten
295e766c27
lib: remove usage of url.parse
...
Since url.parse() is deprecated, it must not be used inside Node.js.
PR-URL: https://github.com/nodejs/node/pull/36853
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2021-02-11 19:30:28 +05:30
Qingyu Deng
9d2125e3bf
http: explain the possibilty of refactor unused argument
...
PR-URL: https://github.com/nodejs/node/pull/37275
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-02-10 12:30:16 +01:00
Qingyu Deng
9fa1f68b55
http: explain the unused argument in IncomingMessage._read
...
PR-URL: https://github.com/nodejs/node/pull/37275
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-02-10 12:30:08 +01:00
Filip Skokan
51249a11c0
crypto: fix subtle.importKey JWK OKP public key import
...
PR-URL: https://github.com/nodejs/node/pull/37255
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-02-09 21:26:45 +01:00
ExE Boss
beee53884d
lib: fix WebIDL object and dictionary type conversion
...
PR-URL: https://github.com/nodejs/node/pull/37047
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-02-08 17:02:16 -08:00
Darshan Sen
fdd7a87b8a
module: use optional chaining in cjs/loader.js
...
PR-URL: https://github.com/nodejs/node/pull/37238
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-02-08 16:39:55 -08:00
Rich Trott
04bef7aabd
util: use assert for unreachable code
...
Great effort is taken to keep `util.inspect()` from throwing while
inspecting a linked list or other items that require recursion. It is
likely still possible at this time to cause a throw with prototype
pollution, but that will change soon when the code is modified to use
primordials.
This commit instructs our coverage to not be concerned about not being
able to reach the throwing-an-error code and changes the throw there to
an assert so users will be instructed to open a bug with Node.js should
they manage to cause the code to throw.
PR-URL: https://github.com/nodejs/node/pull/37249
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-02-08 09:52:58 -08:00
Benjamin Gruenbaum
5ef4c64e5b
lib: add weak event handlers
...
PR-URL: https://github.com/nodejs/node/pull/36607
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2021-02-06 19:01:53 +02:00
Tobias Nießen
406984ec7c
crypto: fix and simplify prime option validation
...
PR-URL: https://github.com/nodejs/node/pull/37164
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-02-06 08:56:13 -08:00
Darshan Sen
c0e66e3e9d
timers: fix unsafe array iteration
...
Fixes: https://github.com/nodejs/node/issues/37222
PR-URL: https://github.com/nodejs/node/pull/37223
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-02-06 05:17:49 -08:00
ExE Boss and Antoine du Hamel
3aba6fef07
repl: add auto‑completion for dynamic import calls
...
Refs: https://github.com/nodejs/node/issues/33238
Refs: https://github.com/nodejs/node/pull/33282
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37178
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-02-06 05:12:59 -08:00
Darshan Sen
6b8b165f90
fs: allow passing negative zero fd
...
Fixes: https://github.com/nodejs/node/issues/37122
PR-URL: https://github.com/nodejs/node/pull/37123
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-02-06 05:09:21 -08:00
James M Snell
7d0f680aaf
fs: use a default callback for fs.close()
...
The `fs.close()` function requires a callback. Most often the only thing
that callback does is check and rethrow the error if one occurs. To
eliminate common boilerplate, make the callback optional with a default
that checks and rethrows the error as an uncaught exception.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37174
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-02-05 08:00:02 -08:00
Gus Caplan
bf2f2b74fa
vm: add importModuleDynamically option to compileFunction
...
This reverts commit 2d5d77306f .
See: https://github.com/nodejs/node/pull/32985
See: https://github.com/nodejs/node/pull/33364
See: https://github.com/nodejs/node/issues/33166
Fixes: https://github.com/nodejs/node/issues/31860
PR-URL: https://github.com/nodejs/node/pull/35431
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org >
2021-02-05 09:16:33 -06:00
Benjamin Gruenbaum
664cce92ec
fs: add AbortSignal support to watch
...
PR-URL: https://github.com/nodejs/node/pull/37190
Refs: https://github.com/nodejs/node/pull/37179
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-02-05 12:35:57 +02:00
Antoine du Hamel
703e566aa1
repl: refactor to avoid unsafe array iteration
...
PR-URL: https://github.com/nodejs/node/pull/37188
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-02-05 00:16:36 +01:00
Robert Nagy
fe43bd8ddd
http: fix ClientRequest unhandled errors
...
ClientRequest could someone cause an unhandled error
from socket.
Fixes: https://github.com/nodejs/node/issues/36931
PR-URL: https://github.com/nodejs/node/pull/36970
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-02-03 23:05:34 +01:00
linkgoron and Fabian Cook
fefc639016
timers: introduce setInterval async iterator
...
Added setInterval async generator to timers\promises.
Utilises async generators to provide an iterator compatible with
`for await`.
Co-Authored-By: Fabian Cook <hello@fabiancook.dev >
fix message
PR-URL: https://github.com/nodejs/node/pull/37153
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-02-03 19:28:09 +02:00
Benjamin Gruenbaum
03380bc16a
stream: improve Readable.from error handling
...
PR-URL: https://github.com/nodejs/node/pull/37158
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-02-03 12:04:37 +02:00
Filip Skokan
a8d7de1efb
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 >
2021-02-02 23:16:51 +01:00
James M Snell
c973d503e0
tls: add ability to get cert/peer cert as X509Certificate object
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37070
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2021-02-02 09:39:27 -08:00