0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

158 Commits

Author SHA1 Message Date
Stefano Vozza
4f6ad5c1dd doc: align doc/api/tls.markdown with style guide
Brings tls.markdown into alignment with the node.js
styleguide, specifically regarding the use of
personal pronouns. Also, fixes various typos,
punctuation errors, missing definite/indefinite
articles and other minor grammatical issues.

PR-URL: https://github.com/nodejs/node/pull/5706
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-20 10:42:04 +02:00
Stefano Vozza
ecbb955be4 doc: remove non-standard use of hyphens
Identifies the non-idiomatic usages of the '-' character
and either removes them or replaces them with colons.

Fixes: https://github.com/nodejs/node/issues/5672
R-URL: https://github.com/nodejs/node/pull/5677
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
2016-03-14 08:32:55 -07:00
Alexander Makarenko
acee594b6e doc: fix links in tls, cluster docs
Fix missing links described in #5322.

PR-URL: https://github.com/nodejs/node/pull/5364
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:00:53 +01:00
Brian White
01dd8ed113 doc: fix inconsistent styling
PR-URL: https://github.com/nodejs/node/pull/4996
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04 10:11:07 -08:00
Brian White
c41c09375b doc: correct tlsSocket.getCipher() description
getCipher() actually includes the protocol version that the cipher was
first supported and *not* the negotiated protocol of the current
connection.

PR-URL: https://github.com/nodejs/node/pull/4995
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-03 21:36:40 -05:00
Brian White
2c357a7e3b tls: add getProtocol() to TLS sockets
This commit adds a new method for TLS sockets that returns the
negotiated protocol version.

PR-URL: https://github.com/nodejs/node/pull/4995
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-03 21:34:06 -05:00
Alexander Makarenko
267bb391ec doc: consistent styling for functions in TLS docs
Provide links for functions where needed and fix function links style.

PR-URL: https://github.com/nodejs/node/pull/5000
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-01 09:09:52 -08:00
Sakthipriyan Vairamani
4714abb482 doc: show links consistently in deprecations
PR-URL: https://github.com/nodejs/node/pull/4907
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-27 13:42:45 -08:00
Robert Jefe Lindstaedt
e436272897 doc: fenced all code blocks, typo fixes
This changes the code blocks from 4-space indentation to ``` fences for
better syntax highlighting and future linting support. Minor On-the-fly
changes for typos and highlight breaking markdown have been made.

JSON-Style objects have been changed so their closing bracket is
on the same line as the opening one.

Known issues:
* Not every JSON / object notation has been improved. Should
  make another run for this.
* Some example functions break hightlighting due to various
  combinations of brackets. However changing them means leaving
  the code style.

Fixes: https://github.com/nodejs/node/issues/4726
PR-URL: https://github.com/nodejs/node/pull/4733
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-21 20:55:09 +01:00
Fedor Indutny
1ab6b21360 tls: rename clientError to tlsClientError
`clientError` will have `http.Server`-specific behavior, and we don't
want to shadow it in `tls.Server`.

PR-URL: https://github.com/nodejs/node/pull/4557
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-01-07 03:38:56 -05:00
Adri Van Houdt
2fd3d8aee6 doc: improve grammar in tls docs
Fix: #4246
PR-URL: https://github.com/nodejs/node/pull/4315
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-12-23 17:17:51 -08:00
James M Snell
9b21119e17 doc: fix, modernize examples in docs
* Use single quotes consistently
* Modernize examples to use template strings and arrow funcs
* Fix a few typos
* Example edits for consistency

PR-URL: https://github.com/nodejs/node/pull/4282
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-12-17 08:07:29 -08:00
Fedor Indutny
c5b4f6bc99 tls: introduce secureContext for tls.connect
Add `secureContext` option to `tls.connect`. It is useful for caching
client certificates, key, and CA certificates.

PR-URL: https://github.com/nodejs/node/pull/4246
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-11 19:53:30 -05:00
Ben Noordhuis
73a9a6fc92 doc: harmonize description of ca argument
Different sections said different things about what the `ca` argument
should look like.  This commit harmonizes them.

Ref: https://github.com/nodejs/node/pull/4099
PR-URL: https://github.com/nodejs/node/pull/4213
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-09 22:29:37 +01:00
jpersson
7e4f22ca13 doc: update links to use https where possible
PR-URL: https://github.com/nodejs/node/pull/4054
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-03 13:40:10 -08:00
jpersson
14b3aab7d2 doc: add links and backticks around names
* add backticks around names
* add single quotes around event names
* add parenthesis after function names
* add internal links between different sections
* add external links to MDN for some JavaScript references
* sort the link definitions alphabetically

PR-URL: https://github.com/nodejs/node/pull/4054
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-03 13:39:09 -08:00
Alexander Gromnitsky
94c3507f5c doc: fix broken references
PR-URL: https://github.com/nodejs/node/pull/3944
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Myles Borins <mborins@us.ibm.com>
2015-11-20 11:52:23 -08:00
Stefan Budeanu
df268f97bc tls: use SHA1 for sessionIdContext
FIPS 140-2 disallows use of MD5, which is used to derive the
default sessionIdContext for tls.createServer().

PR-URL: https://github.com/nodejs/node/pull/3866
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-16 17:26:23 -05:00
Stefan Budeanu
424ae5d4ac tls: Use SHA1 for sessionIdContext in FIPS mode
FIPS 140-2 disallows use of MD5, which is used to derive the
default sessionIdContext for tls.createServer().

PR-URL: https://github.com/nodejs/node/pull/3755
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-11-16 16:47:00 -05:00
Bryan English
cd1123a0fb doc: consistent reference-style links
Moved all the URLs in API docs to the bottom of the files as
reference-style links.

PR-URL: https://github.com/nodejs/node/pull/3845
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-16 07:36:59 -08:00
Tristian Flanagan
f8390fdd75 doc: sort tls alphabetically
Reorders, with no contextual changes, the tls documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:41:10 -08:00
Tyler Henkel
eff8c3e024 doc: add note on tls connection meta data methods
PR-URL: https://github.com/nodejs/node/pull/3746
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-11-10 23:05:06 +01:00
Sakthipriyan Vairamani
5d5a4c4c18 doc: createServer's key option can be an array
The `tls` module's `createServer` and `createSecureContext` accept
`key` option and it can be an array of keys as well. This patch
explains the format of the entries in that array.

Corresponding code:
https://github.com/nodejs/node/blob/v4.1.1/lib/_tls_common.js#L73-L90

PR-URL: https://github.com/nodejs/node/pull/3123
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-10-28 07:46:27 +05:30
Shigeki Ohtsu
802a2e79e1 tls, crypto: add ALPN Support
ALPN is added to tls according to RFC7301, which supersedes NPN.
When the server receives both NPN and ALPN extensions from the client,
ALPN takes precedence over NPN and the server does not send NPN
extension to the client. alpnProtocol in TLSSocket always returns
false when no selected protocol exists by ALPN.
In https server, http/1.1 token is always set when no
options.ALPNProtocols exists.

PR-URL: https://github.com/nodejs/node/pull/2564
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-27 01:31:47 +09:00
Yuval Brik
adfd20b6fd tls: TLSSocket options default isServer false
Upon creating a TLSSocket object, set the default isServer option to false
Updated tls docs and added test-tls-socket-default-options

PR-URL: https://github.com/nodejs/node/pull/2614
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-10-20 16:14:22 -04:00
Коренберг Марк
d8db75730f tls: add options argument to createSecurePair
Helps in implementation of #6204, where some options passed to
`createSecurePair()` are ignored before this patch.

These options are very helpful if someone wants to pass
`options.servername` or `options.SNICallback` to securepair.

PR-URL: https://github.com/nodejs/node/pull/2441
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-10-17 11:53:45 -04:00
Shigeki Ohtsu
f72e178a78 tls: add minDHSize option to tls.connect()
Add a new option to specifiy a minimum size of an ephemeral DH
parameter to accept a tls connection. Default is 1024 bit.

PR-URL: https://github.com/nodejs/node/pull/1831
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-10-16 11:39:54 +09:00
Shigeki Ohtsu
6d92ebac11 tls: add TLSSocket.getEphemeralKeyInfo()
Returns an object representing a type, name and size of an ephemeral
key exchange in a client connection. Currently only DHE and ECHE are
supported.

This api only works on on a client connection. When it is called on a
server connection, null is returned. When its key exchange is not
ephemeral, an empty object is returned.

PR-URL: https://github.com/nodejs/node/pull/1831
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-10-16 11:39:45 +09:00
Roman Reiss
503f279527 doc: fix indent in tls resumption example
Markdown requires 4-space indent to correctly format code blocks. This
fixes the example so it's correctly presented as code.

PR-URL: https://github.com/nodejs/node/pull/3372
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-10-15 11:30:44 +02:00
Roman Reiss
07a84191c0 doc: add TLS session resumption example
Using TLS session resumption correctly is not obvious. This added
example code should help new users understand how to use it correctly.

Related issue: https://github.com/nodejs/node/issues/3132
PR-URL: https://github.com/nodejs/node/pull/3147
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-10-07 20:50:47 +02:00
Sakthipriyan Vairamani
5c77031f95 doc: make the deprecations consistent
The deprecation messages in the documentations should be in the format

    Stability: 0 - Deprecated: Use [alternate] instead.

so that they will be consistent.

PR-URL: https://github.com/nodejs/node/pull/2450
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-24 13:38:37 +05:30
cjihrig
3b602527d1 node: additional cleanup for node rename
Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-08-23 17:59:43 -04:00
cjihrig
a69ab27ab4 node: rename from io.js to node
This commit replaces instances of io.js with Node.js, based on the
recent convergence. There are some remaining instances of io.js,
related to build and the installer.

Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2015-08-23 17:59:43 -04:00
James M Snell
5ba868f024 tls: add --tls-cipher-list command line switch
This adds a new `--tls-cipher-list` command line switch
that can be used to override the built-in default cipher
list. The intent of this is to make it possible to enforce
an alternative default cipher list at the process level.
Overriding the default cipher list is still permitted at
the application level by changing the value of
`require('tls').DEFAULT_CIPHERS`.

As part of the change, the built in default list is moved
out of tls.js and into node_constants.h and node_constants.cc.
Two new constants are added to require('constants'):

  * defaultCipherList (the active default cipher list)
  * defaultCoreCipherList (the built-in default cipher list)

A test case and doc changes are included.

A new NODE_DEFINE_STRING_CONSTANT macro is also created in
node_internals.h

When node_constants is initialized, it will pick up either
the passed in command line switch or fallback to the default
built-in suite.

Within joyent/node, this change had originaly been wrapped
up with a number of other related commits involving the
removal of the RC4 cipher. This breaks out this isolated
change.

/cc @mhdawson, @misterdjules, @trevnorris, @indutny, @rvagg

Reviewed By: Ben Noordhuis <ben@strongloop.com>
PR-URL: https://github.com/nodejs/node/pull/2412
2015-08-23 08:52:01 -07:00
Fedor Indutny
e11fc67225 tls: add getTicketKeys()/setTicketKeys()
Introduce two new APIs for getting/settings the TLS Server Ticket Keys.

Fix: #1465
PR-URL: https://github.com/nodejs/io.js/pull/2227
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-23 11:13:26 -07:00
Roman Reiss
9f3a03f0d4 doc: add references to crypto.getCurves()
This adds references to the newly available crypto.getCurves method
where appropriate.

PR-URL: https://github.com/nodejs/io.js/pull/1918
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-06-09 22:17:55 +02:00
Ryan Petschek
deb8b87dc9 doc: add note about available ECC curves
Added instructions on how to get the elliptic curves supported by the
OpenSSL installation in the crypto.createECDH() constructor. Also made
a few minor grammar fixes within the same paragraph.

PR-URL: https://github.com/nodejs/io.js/pull/1913
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-06-07 20:47:55 +02:00
Shigeki Ohtsu
9b35be5810 tls: make server not use DHE in less than 1024bits
DHE key lengths less than 1024bits is already weaken as pointed out in
https://weakdh.org/ . 1024bits will not be safe in near future. We
will extend this up to 2048bits somedays later.

PR-URL: https://github.com/nodejs/io.js/pull/1739
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-05-21 00:02:44 +09:00
Mike MacCana
5755fc099f tls: update default ciphers to use gcm and aes128
AES-GCM or CHACHA20_POLY1305 ciphers must be used in current version of
Chrome to avoid an 'obsolete cryptography' warning.

Prefer 128 bit AES over 192 and 256 bit AES considering attacks that
specifically affect the larger key sizes but do not affect AES 128.

PR-URL: https://github.com/iojs/io.js/pull/1660
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-11 13:37:48 +02:00
Alexander Gromnitsky
02388dbf40 doc: fix some cross-references
PR-URL: https://github.com/iojs/io.js/pull/1584
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-02 14:07:21 +02:00
skenqbx
80e14d736e doc: move checkServerIdentity option to tls.connect()
PR-URL: https://github.com/iojs/io.js/pull/1107
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-03-10 09:49:08 -04:00
Chris Dickinson
cf0306cd71 doc: update stability index
This simplifies the stability index to 4 levels:

0 - deprecated
1 - experimental / feature-flagged
2 - stable
3 - locked

Domains has been downgraded to deprecated, assert has been
downgraded to stable. Timers and Module remain locked. All
other APIs are now stable.

PR-URL: https://github.com/iojs/io.js/pull/943
Fixes: https://github.com/iojs/io.js/issues/930
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
2015-02-27 14:23:01 -08:00
silverwind
c5050d8e4d doc: fix 'dhparam' description of tls.createServer
fixes #958

Fixes: https://github.com/iojs/io.js/issues/958
PR-URL: https://github.com/iojs/io.js/pull/968
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-02-26 23:44:50 +09:00
Roman Reiss
ed240f44f7 doc: document 'ciphers' option of tls.connect
This option has been there for a long time, but has never been
documented. It's functionally identical to the server counterpart.

PR-URL: https://github.com/iojs/io.js/pull/845
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-18 15:15:18 +01:00
Roman Reiss
77f35861d0 tls: more secure defaults
This updates the default cipher suite to an more secure list, which
prefers strong ciphers with Forward Secrecy. Additionally, it enables
`honorCipherOrder` by default.

Noteable effect of this change is that the insecure RC4 ciphers are
disabled and that Chrome negotiates a more secure ECDHE cipher.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/826
2015-02-16 12:33:12 +01:00
Ben Noordhuis
789bbb91d3 doc: update node.js references in api docs
Fixes: https://github.com/iojs/io.js/issues/740
PR-URL: https://github.com/iojs/io.js/pull/750
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-07 17:07:15 -05:00
Andres Suarez
5c7ab96b90 doc: fix net.Server.listen bind behavior
PR-URL: https://github.com/iojs/io.js/pull/503
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-27 16:31:15 +11:00
Ben Noordhuis
26dd9e15bb build,src: remove sslv2 support
SSLv2 has been deprecated and known broken for nearly twenty years now.

I made SSLv2 support opt-in well over a year ago in commit 39aa894 and
now this commit removes it entirely.

PR-URL: https://github.com/iojs/io.js/pull/290
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-11 16:07:45 +01:00
Eric Mill
d8d1c4c87c doc: update openssl commands to use best practices
This updates key size to 2048 and default hash function to sha256.

Reviewed-by: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8690

Cherry-picked-from: 88bd95cfef
2015-01-10 22:15:49 +01:00
Sam Roberts
b42c0853ae doc: add tls server.close() callback docs
Also, tests to confirm its existence.

PR-URL: https://github.com/iojs/io.js/pull/217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-30 21:40:46 +01:00