Tobias Nießen
969bd1eb7b
crypto: add support for RSA-PSS keys
...
This commit adds support for RSA-PSS keys, including
- KeyObjects of type rsa-pss,
- key pair generation for RSA-PSS, and
- signing and verification using RSA-PSS keys.
PR-URL: https://github.com/nodejs/node/pull/26960
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-04-08 09:22:32 +02:00
Tobias Nießen
73bca57988
crypto: fail early if passphrase is too long
...
This causes OpenSSL to fail early if the decryption passphrase is too
long, and produces a somewhat helpful error message.
PR-URL: https://github.com/nodejs/node/pull/27010
Refs: https://github.com/nodejs/node/pull/25208
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-04-04 16:09:11 +02:00
Filip Skokan
7c1fc93e30
crypto: don't crash on unknown asymmetricKeyType
...
PR-URL: https://github.com/nodejs/node/pull/26786
Fixes: https://github.com/nodejs/node/issues/26775
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-04-01 12:49:17 +02:00
Brian White
7d0e50dcfe
crypto: add crypto.sign() and crypto.verify()
...
These methods are added primarily to allow signing and verifying
using Ed25519 and Ed448 keys, which do not support streaming of
input data. However, any key type can be used with these new
APIs, to allow better performance when only signing/verifying
a single chunk.
Fixes: https://github.com/nodejs/node/issues/26320
PR-URL: https://github.com/nodejs/node/pull/26611
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-03-28 21:57:53 -04:00
Michaël Zasso
2c73868b04
2019-03-28, Version 11.13.0 (Current)
...
Notable changes:
* crypto
* Allow deriving public from private keys (Tobias Nießen)
[#26278 ](https://github.com/nodejs/node/pull/26278 ).
* events
* Added a `once` function to use `EventEmitter` with promises
(Matteo Collina) [#26078 ](https://github.com/nodejs/node/pull/26078 ).
* tty
* Added a `hasColors` method to `WriteStream` (Ruben Bridgewater)
[#26247 ](https://github.com/nodejs/node/pull/26247 ).
* Added NO_COLOR and FORCE_COLOR support (Ruben Bridgewater)
[#26485 ](https://github.com/nodejs/node/pull/26485 ).
* v8
* Added `v8.getHeapSnapshot` and `v8.writeHeapSnapshot` to generate snapshots
in the format used by tools such as Chrome DevTools (James M Snell)
[#26501 ](https://github.com/nodejs/node/pull/26501 ).
* worker
* Added `worker.moveMessagePortToContext`. This enables using MessagePorts in
different vm.Contexts, aiding with the isolation that the vm module seeks to
provide (Anna Henningsen)
[#26497 ](https://github.com/nodejs/node/pull/26497 ).
* C++ API
* `AddPromiseHook` is now deprecated. This API was added to fill an use case
that is served by `async_hooks`, since that has `Promise` support
(Anna Henningsen) [#26529 ](https://github.com/nodejs/node/pull/26529 ).
* Added a `Stop` API to shut down Node.js while it is running
(Gireesh Punathil) [#21283 ](https://github.com/nodejs/node/pull/21283 ).
* meta
* [Gireesh Punathil](https://github.com/gireeshpunathil ) is now a member of
the Technical Steering Committee
[#26657 ](https://github.com/nodejs/node/pull/26657 ).
* Added [Yongsheng Zhang](https://github.com/ZYSzys ) to collaborators
[#26730 ](https://github.com/nodejs/node/pull/26730 ).
PR-URL: https://github.com/nodejs/node/pull/26949
2019-03-28 20:23:29 +01:00
Filip Skokan
85fda7e848
crypto: add support for x25119 and x448 KeyObjects
...
PR-URL: https://github.com/nodejs/node/pull/26774
Refs: https://github.com/nodejs/node/issues/26626
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-25 01:40:54 +01:00
Tobias Nießen
3a9592496c
crypto: add support for EdDSA key pair generation
...
PR-URL: https://github.com/nodejs/node/pull/26554
Refs: https://github.com/nodejs/node/pull/26319
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-03-18 21:59:47 +01:00
Filip Skokan
f1056542f0
crypto: expose KeyObject class
...
PR-URL: https://github.com/nodejs/node/pull/26438
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-03-17 10:53:58 +01:00
Tobias Nießen
6f77af541e
Revert "crypto: add KeyObject.asymmetricKeySize"
...
This reverts commit 4895927a0a .
PR-URL: https://github.com/nodejs/node/pull/26636
Fixes: https://github.com/nodejs/node/issues/26631
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-03-15 17:01:56 +01:00
Brian White
247c14c040
crypto: fix EdDSA support for KeyObject
...
PR-URL: https://github.com/nodejs/node/pull/26319
Fixes: https://github.com/nodejs/node/issues/26316
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2019-03-12 09:25:14 -04:00
Patrick Gansterer
4895927a0a
crypto: add KeyObject.asymmetricKeySize
...
Expose the size of asymetric keys of crypto key object from the
crypto module added in v11.6.0.
PR-URL: https://github.com/nodejs/node/pull/26387
Refs: https://github.com/nodejs/node/pull/24234
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-07 00:24:07 +01:00
Tobias Nießen
fe7162915e
crypto: allow deriving public from private keys
...
This change allows passing private key objects to
crypto.createPublicKey, resulting in a key object that represents a
valid public key for the given private key. The returned public key
object can be used and exported safely without revealing information
about the private key.
PR-URL: https://github.com/nodejs/node/pull/26278
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-03-05 16:32:19 +01:00
Beni von Cheni
8f87080fcd
doc: correct typos in various docs
...
PR-URL: https://github.com/nodejs/node/pull/26312
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-02 14:10:30 +01:00
Filip Skokan
71b00f0b5b
doc: fix keyObject.symmetricSize to be keyObject.symmetricKeySize
...
PR-URL: https://github.com/nodejs/node/pull/25670
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-01-26 03:09:18 +02:00
Ruben Bridgewater
d3f8f905b3
2019-01-17, Version 11.7.0 (Current), @BridgeAR
...
Notable Changes
* compression / zlib:
* Added brotli support (Anna Henningsen and Zach Vacura)
https://github.com/nodejs/node/pull/24938
* console:
* Added `inspectOptions` option (Ruben Bridgewater)
https://github.com/nodejs/node/pull/24978
* crypto:
* Always accept private keys as public keys (Tobias Nießen)
https://github.com/nodejs/node/pull/25217
* deps:
* Upgrade npm to v6.5.0 (Jordan Harband)
https://github.com/nodejs/node/pull/25234
* fs:
* Use internalBinding('fs') internally instead of
process.binding('fs') (Masashi Hirano)
https://github.com/nodejs/node/pull/22478
* http(s):
* Support overriding http\\s.globalAgent (Roy Sommer)
https://github.com/nodejs/node/pull/25170
* util:
* Inspect ArrayBuffers contents closely (Ruben Bridgewater)
https://github.com/nodejs/node/pull/25006
* worker:
* Expose workers by default and remove `--experimental-worker` flag
(Anna Henningsen) https://github.com/nodejs/node/pull/25361
PR-URL: https://github.com/nodejs/node/pull/25537
2019-01-18 14:03:19 +01:00
Sam Roberts
273d7dd8b8
doc: improve Sign/Verify examples and docs
...
- Use complete examples that can be pasted and run as-is
- Move note about algorithm to the functions it applies to
- Uncapitalize inconsistence use of "Class"
- Use both EC and RSA keys in the examples
- Note that hash and digest are two names for the same algorithms
PR-URL: https://github.com/nodejs/node/pull/25452
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-01-14 15:32:57 -08:00
Matteo Collina
2d2f82c413
doc: make sure that calls to .read() are looped
...
The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.
Fixes: https://github.com/nodejs/node/issues/20503
PR-URL: https://github.com/nodejs/node/pull/25375
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-01-10 11:19:38 +01:00
Tobias Nießen
ae2d1f0e05
crypto: always accept private keys as public keys
...
Some APIs already accept private keys instead of public keys. This
changes all relevant crypto APIs to do so.
PR-URL: https://github.com/nodejs/node/pull/25217
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-01-08 00:20:09 +01:00
Tobias Nießen
7afdfaec08
crypto: fix key object wrapping in sync keygen
...
PR-URL: https://github.com/nodejs/node/pull/25326
Fixes: https://github.com/nodejs/node/issues/25322
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-01-07 07:33:35 +01:00
Tobias Nießen
345d3f380b
doc: document key encryption options
...
PR-URL: https://github.com/nodejs/node/pull/23632
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-01-05 17:54:43 +01:00
Myles Borins
e01999db14
2018-12-26, Version 11.6.0 (Current)
...
Notable Changes:
* cli:
- add --max-http-header-size flag (cjihrig)
https://github.com/nodejs/node/pull/24811
* crypto:
- always accept certificates as public keys (Tobias Nießen)
https://github.com/nodejs/node/pull/24234
- add key object API (Tobias Nießen) [#24234 ](https://github.com/nodejs/node/pull/24234 )
- update root certificates (Sam Roberts)
https://github.com/nodejs/node/pull/25113
* deps:
- upgrade to libuv 1.24.1 (cjihrig)
https://github.com/nodejs/node/pull/25078
- upgrade npm to 6.5.0 (Audrey Eschright)
https://github.com/nodejs/node/pull/24734
* http:
- add maxHeaderSize property (cjihrig)
https://github.com/nodejs/node/pull/24860
PR-URL: https://github.com/nodejs/node/pull/25175
2018-12-26 11:24:51 -05:00
Tobias Nießen
8f300bc8a7
crypto: always accept certificates as public keys
...
PR-URL: https://github.com/nodejs/node/pull/24234
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-24 14:50:25 +01:00
Tobias Nießen
823d86c47c
crypto: add key object API
...
This commit makes multiple important changes:
1. A new key object API is introduced. The KeyObject class itself is
not exposed to users, instead, several new APIs can be used to
construct key objects: createSecretKey, createPrivateKey and
createPublicKey. The new API also allows to convert between
different key formats, and even though the API itself is not
compatible to the WebCrypto standard in any way, it makes
interoperability much simpler.
2. Key objects can be used instead of the raw key material in all
relevant crypto APIs.
3. The handling of asymmetric keys has been unified and greatly
improved. Node.js now fully supports both PEM-encoded and
DER-encoded public and private keys.
4. Conversions between buffers and strings have been moved to native
code for sensitive data such as symmetric keys due to security
considerations such as zeroing temporary buffers.
5. For compatibility with older versions of the crypto API, this
change allows to specify Buffers and strings as the "passphrase"
option when reading or writing an encoded key. Note that this
can result in unexpected behavior if the password contains a
null byte.
PR-URL: https://github.com/nodejs/node/pull/24234
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-24 14:50:16 +01:00
Ruben Bridgewater
1f85ea979c
tools: capitalize sentences
...
This adds the `capitalized-comments` eslint rule to verify that
actual sentences use capital letters as starting letters. It ignores
special words and all lines below 62 characters.
PR-URL: https://github.com/nodejs/node/pull/24808
Reviewed-By: Sam Ruby <rubys@intertwingly.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-12-10 17:07:18 +01:00
Thomas Watson
fa19ce9233
doc: fix added version of randomFill+randomFillSync
...
PR-URL: https://github.com/nodejs/node/pull/24812
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-12-03 20:58:14 +01:00
Sam Roberts
64cea5a1ac
doc: sort bottom-of-file markdown links
...
Reapply https://github.com/nodejs/node/pull/12726
It would be nice to have the sort check applied as part of doc testing,
but this change doesn't implement that.
PR-URL: https://github.com/nodejs/node/pull/24679
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-11-28 13:09:31 -08:00
Mayank Asthana
97309030ef
doc: update crypto examples to not use deprecated api
...
Updated Cipher and Decipher examples to not use deprecated
`crypto.createCipher` and `crypto.createDecipher` in examples and
instead use `createCipheriv` and `createDecipheriv`.
Fixes: https://github.com/nodejs/node/issues/24046
PR-URL: https://github.com/nodejs/node/pull/24107
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-11-18 23:26:00 -08:00
Ruben Bridgewater
406d9caab5
2018-11-15, Version 11.2.0 (Current)
...
Notable changes:
* deps:
* A new experimental HTTP parser (`llhttp`) is now supported.
https://github.com/nodejs/node/pull/24059
* timers:
* Fixed an issue that could cause setTimeout to stop working as
expected. https://github.com/nodejs/node/pull/24322
* Windows
* A crashing process will now show the names of stack frames if the
node.pdb file is available.
https://github.com/nodejs/node/pull/23822
* Continued effort to improve the installer's new stage that installs
native build tools.
https://github.com/nodejs/node/pull/23987 ,
https://github.com/nodejs/node/pull/24348
* child_process:
* On Windows the `windowsHide` option default was restored to
`false`. This means `detached` child processes and GUI apps will
once again start in a new window.
https://github.com/nodejs/node/pull/24034
* Added new collaborators:
* [oyyd](https://github.com/oyyd ) - Ouyang Yadong.
https://github.com/nodejs/node/pull/24300
* [psmarshall](https://github.com/psmarshall ) - Peter Marshall.
https://github.com/nodejs/node/pull/24170
* [shisama](https://github.com/shisama ) - Masashi Hirano.
https://github.com/nodejs/node/pull/24136
PR-URL: https://github.com/nodejs/node/pull/24350
2018-11-15 22:16:09 +01:00
Sam Roberts
426ca0837a
doc: clarify allowed encoding parameter types
...
This fixes the incorrect enumerations of their possible values, which
weren't up to date with the values actually supported. Also renamed
two arguments that used "format" when they meant "encoding".
PR-URL: https://github.com/nodejs/node/pull/24230
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-11-09 15:57:17 -08:00
chux0519
5c59622243
crypto: add support for chacha20-poly1305 for AEAD
...
openSSL supports AEAD_CHACHA20_POLY1305(rfc7539) since 1.1.
PR-URL: https://github.com/nodejs/node/pull/24081
Fixes: https://github.com/nodejs/node/issues/24080
Refs: https://tools.ietf.org/html/rfc7539
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-11-07 18:43:41 -05:00
Ouyang Yadong
5689d55392
doc: add types and their corresponding return values
...
This commit supplements some types and their corresponding return
values in docs, including `AsyncResource`, `DiffieHellman`,
`ECDH`, `https.Server`, `repl.REPLServer`.
PR-URL: https://github.com/nodejs/node/pull/23998
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-11-02 00:36:40 +02:00
Denys Otrishko
f90cf19fdd
doc: remove notice of dashes in V8 options
...
Previously only V8 options supported both dashes in them (making them
equivalent), but now Node.js also supports both styles so the note can
be removed.
PR-URL: https://github.com/nodejs/node/pull/23903
Refs: https://github.com/nodejs/node/pull/18592
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-10-29 21:24:08 +00:00
James M Snell
3516052bee
2018-10-23, Version 11.0.0 (Current)
...
Notable changes:
* Build
* FreeBSD 10 is no longer supported.[#22617 ](https://github.com/nodejs/node/pull/22617 )
* `child_process`
* The default value of the `windowsHide` option has been changed
to `true`. [#21316 ](https://github.com/nodejs/node/pull/21316 )
* `console`
* `console.countReset()` will emit a warning if the timer
being reset does not exist. [#21649 ](https://github.com/nodejs/node/pull/21649 )
* `console.time()` will no longer reset a timer if it already
exists. [#20442 ](https://github.com/nodejs/node/pull/20442 )
* Dependencies
* V8 has been updated to 7.0.
[#22754 ](https://github.com/nodejs/node/pull/22754 )
* `fs`
* The `fs.read()` method now requires a callback.
[#22146 ](https://github.com/nodejs/node/pull/22146 )
* The previously deprecated `fs.SyncWriteStream` utility has been
removed.[#20735 ](https://github.com/nodejs/node/pull/20735 )
* `http`
* The `http`, `https`, and `tls` modules now use the WHATWG URL parser
by default. [#20270 ](https://github.com/nodejs/node/pull/20270 )
* General
* Use of `process.binding()` has been deprecated. Userland code using
`process.binding()` should re-evaluate that use and begin migrating. If
there are no supported API alternatives, please open an issue in the
Node.js GitHub repository so that a suitable alternative may be discussed.
* An experimental implementation of `queueMicrotask()` has been added.
[#22951 ](https://github.com/nodejs/node/pull/22951 )
* Internal
* Windows performance-counter support has been removed.
[#22485 ](https://github.com/nodejs/node/pull/22485 )
* The `--expose-http2` command-line option has been removed.
[#20887 ](https://github.com/nodejs/node/pull/20887 )
* Timers
* Interval timers will be rescheduled even if previous interval threw
an error. [#20002 ](https://github.com/nodejs/node/pull/20002 )
* `util`
* The WHATWG `TextEncoder` and `TextDecoder` are now globals.
[#22281 ](https://github.com/nodejs/node/pull/22281 )
* `util.inspect()` output size is limited to 128 MB by default.
[#22756 ](https://github.com/nodejs/node/pull/22756 )
* A runtime warning will be emitted when `NODE_DEBUG` is set for
either `http` or `http2`. [#21914 ](https://github.com/nodejs/node/pull/21914 )
2018-10-23 11:03:02 -07:00
James M Snell
814f89db61
doc: add missing deprecation labels
...
Fixes: https://github.com/nodejs/node/issues/20841
PR-URL: https://github.com/nodejs/node/pull/23761
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
2018-10-19 14:38:47 -07:00
Michaël Zasso
cd8ee2d033
2018-10-10, Version 10.12.0 (Current)
...
Notable changes:
* assert
* The diff output is now a tiny bit improved by sorting object
properties when inspecting the values that are compared with each
other. https://github.com/nodejs/node/pull/22788
* cli
* The options parser now normalizes `_` to `-` in all multi-word
command-line flags, e.g. `--no_warnings` has the same effect as
`--no-warnings`. https://github.com/nodejs/node/pull/23020
* Added bash completion for the `node` binary. To generate a bash
completion script, run `node --completion-bash`. The output can be
saved to a file which can be sourced to enable completion.
https://github.com/nodejs/node/pull/20713
* crypto
* Added support for PEM-level encryption.
https://github.com/nodejs/node/pull/23151
* Added an API asymmetric key pair generation. The new methods
`crypto.generateKeyPair` and `crypto.generateKeyPairSync` can be
used to generate public and private key pairs. The API supports
RSA, DSA and EC and a variety of key encodings (both PEM and DER).
https://github.com/nodejs/node/pull/22660
* fs
* Added a `recursive` option to `fs.mkdir` and `fs.mkdirSync`. If
this option is set to true, non-existing parent folders will be
automatically created. https://github.com/nodejs/node/pull/21875
* http2
* Added a `'ping'` event to `Http2Session` that is emitted whenever a
non-ack `PING` is received.
https://github.com/nodejs/node/pull/23009
* Added support for the `ORIGIN` frame.
https://github.com/nodejs/node/pull/22956
* Updated nghttp2 to 1.34.0. This adds RFC 8441 extended connect
protocol support to allow use of WebSockets over HTTP/2.
https://github.com/nodejs/node/pull/23284
* module
* Added `module.createRequireFromPath(filename)`. This new method can
be used to create a custom require function that will resolve
modules relative to the filename path.
https://github.com/nodejs/node/pull/19360
* process
* Added a `'multipleResolves'` process event that is emitted whenever
a `Promise` is attempted to be resolved multiple times, e.g. if the
`resolve` and `reject` functions are both called in a `Promise`
executor. https://github.com/nodejs/node/pull/22218
* url
* Added `url.fileURLToPath(url)` and `url.pathToFileURL(path)`. These
methods can be used to correctly convert between file: URLs and
absolute paths. https://github.com/nodejs/node/pull/22506
* util
* Added the `sorted` option to `util.inspect()`. If set to `true`,
all properties of an object and Set and Map entries will be sorted
in the returned string. If set to a function, it is used as a
compare function. https://github.com/nodejs/node/pull/22788
* The `util.instpect.custom` symbol is now defined in the global
symbol registry as `Symbol.for('nodejs.util.inspect.custom')`.
https://github.com/nodejs/node/pull/20857
* Added support for `BigInt` numbers in `util.format()`.
https://github.com/nodejs/node/pull/22097
* V8 API
* A number of V8 C++ APIs have been marked as deprecated since they
have been removed in the upstream repository. Replacement APIs
are added where necessary. https://github.com/nodejs/node/pull/23159
* Windows
* The Windows msi installer now provides an option to automatically
install the tools required to build native modules.
https://github.com/nodejs/node/pull/22645
* Workers
* Debugging support for Workers using the DevTools protocol has been
implemented. https://github.com/nodejs/node/pull/21364
* The public `inspector` module is now enabled in Workers.
https://github.com/nodejs/node/pull/22769
* Added new collaborators:
* digitalinfinity - Hitesh Kanwathirtha
PR-URL: https://github.com/nodejs/node/pull/23313
2018-10-10 23:18:55 +02:00
Tobias Nießen
058c5b81cd
crypto: do not allow multiple calls to setAuthTag
...
Calling setAuthTag multiple times can result in hard to detect bugs
since to the user, it is unclear which invocation actually affected
OpenSSL.
PR-URL: https://github.com/nodejs/node/pull/22931
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-09-21 11:40:35 +02:00
Tobias Nießen
085dcf0e59
crypto: allow promisifying generateKeyPair
...
PR-URL: https://github.com/nodejs/node/pull/22660
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-09-20 14:31:18 +02:00
Tobias Nießen
8c502f54ce
crypto: add API for key pair generation
...
This adds support for RSA, DSA and EC key pair generation with a
variety of possible output formats etc.
PR-URL: https://github.com/nodejs/node/pull/22660
Fixes: https://github.com/nodejs/node/issues/15116
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-09-20 14:31:14 +02:00
Tobias Nießen
19ad6b8f72
crypto: deprecate digest == null in PBKDF2
...
I assume that permitting digest === null was unintentional when
digest === undefined was deprecated since their behavior was
equivalent. The sha1 default for digest === null has somehow made it
through refactoring of the PBKDF2 module multiple times, even though
digest === undefined has been EOL for some time now.
This change deprecates setting digest to null so we can fix the
behavior in Node.js 12 or so.
PR-URL: https://github.com/nodejs/node/pull/22861
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-19 18:31:28 +02:00
MaleDong
ba0b4e43e4
lib,doc: remove unused parameter, improve docs
...
1) Remove 'callback' in 'check' function, because we don't check or use
that directly.
2) Make 'digest' clearer in the documentation.
PR-URL: https://github.com/nodejs/node/pull/22858
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-09-18 16:06:32 +02:00
Anna Henningsen
c33e27dc3c
doc: improve asymmetric crypto docs
...
Refs: https://github.com/nodejs/node/issues/22792
PR-URL: https://github.com/nodejs/node/pull/22820
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-09-17 17:15:14 +02:00
Mohit kumar Bajoria
cb3d6d5113
doc: add missing options for crypto sign.sign()
...
Fixes: https://github.com/nodejs/node/issues/22813
PR-URL: https://github.com/nodejs/node/pull/22824
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-09-17 14:49:20 +02:00
Michaël Zasso
ed976d76b0
2018-09-06, Version 10.10.0 (Current)
...
Notable changes:
* child_process:
* `TypedArray` and `DataView` values are now accepted as input by
`execFileSync` and `spawnSync`. https://github.com/nodejs/node/pull/22409
* coverage:
* Native V8 code coverage information can now be output to disk by setting the
environment variable `NODE_V8_COVERAGE` to a directory. https://github.com/nodejs/node/pull/22527
* deps:
* The bundled npm was upgraded to version 6.4.1. https://github.com/nodejs/node/pull/22591
* Changelogs:
[6.3.0-next.0](https://github.com/npm/cli/releases/tag/v6.3.0-next.0 )
[6.3.0](https://github.com/npm/cli/releases/tag/v6.3.0 )
[6.4.0](https://github.com/npm/cli/releases/tag/v6.4.0 )
[6.4.1](https://github.com/npm/cli/releases/tag/v6.4.1 )
* fs:
* The methods `fs.read`, `fs.readSync`, `fs.write`, `fs.writeSync`,
`fs.writeFile` and `fs.writeFileSync` now all accept `TypedArray` and
`DataView` objects. https://github.com/nodejs/node/pull/22150
* A new boolean option, `withFileTypes`, can be passed to to `fs.readdir` and
`fs.readdirSync`. If set to true, the methods return an array of directory
entries. These are objects that can be used to determine the type of each
entry and filter them based on that without calling `fs.stat`. https://github.com/nodejs/node/pull/22020
* http2:
* The `http2` module is no longer experimental. https://github.com/nodejs/node/pull/22466
* os:
* Added two new methods: `os.getPriority` and `os.setPriority`, allowing to
manipulate the scheduling priority of processes. https://github.com/nodejs/node/pull/22407
* process:
* Added `process.allowedNodeEnvironmentFlags`. This object can be used to
programmatically validate and list flags that are allowed in the
`NODE_OPTIONS` environment variable. https://github.com/nodejs/node/pull/19335
* src:
* Deprecated option variables in public C++ API. https://github.com/nodejs/node/pull/22515
* Refactored options parsing. https://github.com/nodejs/node/pull/22392
* vm:
* Added `vm.compileFunction`, a method to create new JavaScript functions from
a source body, with options similar to those of the other `vm` methods. https://github.com/nodejs/node/pull/21571
* Added new collaborators:
* [lundibundi](https://github.com/lundibundi ) - Denys Otrishko
PR-URL: https://github.com/nodejs/node/pull/22716
2018-09-06 23:57:43 +02:00
Tobias Nießen
64cf96d684
doc: improve ECDH example
...
PR-URL: https://github.com/nodejs/node/pull/22607
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-09-03 10:51:13 +02:00
Vse Mozhet Byt
1a25f9639a
doc: remove redundant 'Example:' and similar notes
...
Some nits were also fixed in passing.
PR-URL: https://github.com/nodejs/node/pull/22537
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-29 16:53:03 +03:00
Rod Vagg
97c1fa3d3b
2018-08-15, Version 10.9.0 (Current)
...
Notable changes:
* buffer:
* Fix out-of-bounds (OOB) write in `Buffer.write()` for UCS-2 encoding
(CVE-2018-12115)
* Fix unintentional exposure of uninitialized memory in `Buffer.alloc()`
(CVE-2018-7166)
* deps:
* Upgrade to OpenSSL 1.1.0i, fixing:
- Client DoS due to large DH parameter (CVE-2018-0732)
- ECDSA key extraction via local side-channel (CVE not assigned)
* Upgrade V8 from 6.7 to 6.8 (Michaël Zasso) #21079
- Memory reduction and performance improvements, details at:
https://v8project.blogspot.com/2018/06/v8-release-68.html
* http: `http.get()` and `http.request()` (and `https` variants) can now accept
three arguments to allow for a `URL` _and_ an `options` object
(Sam Ruby) #21616
* Added new collaborators
* Sam Ruby (https://github.com/rubys )
* George Adams (https://github.com/gdams )
2018-08-16 11:52:38 +10:00
Gerhard Stoebich
acc633c76e
doc: correct crypto.randomFill() and randomFillSync()
...
Correct return type of `crypto.randomFillSync()` which is of same type as
passed as `buffer` argument.
Correct samples for `randomFill()` and `randomFillSync()` using a `TypeArray`
or `DataView` as these types don't support `.toString(encoding)`.
PR-URL: https://github.com/nodejs/node/pull/21550
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-05 10:55:07 -07:00
Anna Henningsen
e9b22e9569
crypto: add better scrypt option aliases
...
Make parameter names available in a human-readable way, for
more accessible/self-documenting usage of the `scrypt` functions.
This implements a review comment from the original PR that has
not been addressed.
Refs: https://github.com/nodejs/node/pull/20816#discussion_r189220776
PR-URL: https://github.com/nodejs/node/pull/21525
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-07-18 14:18:01 +02:00
Tobias Nießen
b3f459e6cf
crypto: add support for OCB mode for AEAD
...
PR-URL: https://github.com/nodejs/node/pull/21447
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-18 13:10:10 +02:00
Sam Ruby
6a99e3e21c
doc: make markdown input compliant
...
PR-URL: https://github.com/nodejs/node/pull/21780
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-07-16 00:04:56 +03:00