@@ -376,8 +376,8 @@ more information.
376376added: v0.3.2
377377-->
378378
379- * ` callback ` {Function} An optional listener callback that will be registered to
380- listen for the server instance's ` 'close' ` event.
379+ * ` callback ` {Function} A listener callback that will be registered to listen
380+ for the server instance's ` 'close' ` event.
381381
382382The ` server.close() ` method stops the server from accepting new connections.
383383
@@ -458,24 +458,24 @@ changes:
458458 * ` isServer ` : The SSL/TLS protocol is asymmetrical, TLSSockets must know if
459459 they are to behave as a server or a client. If ` true ` the TLS socket will be
460460 instantiated as a server. ** Default:** ` false ` .
461- * ` server ` {net.Server} An optional [ ` net.Server ` ] [ ] instance.
461+ * ` server ` {net.Server} A [ ` net.Server ` ] [ ] instance.
462462 * ` requestCert ` : Whether to authenticate the remote peer by requesting a
463463 certificate. Clients always request a server certificate. Servers
464- (` isServer ` is true) may optionally set ` requestCert ` to true to request a
465- client certificate.
466- * ` rejectUnauthorized ` : Optional, see [ ` tls.createServer() ` ] [ ]
467- * ` ALPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
468- * ` SNICallback ` : Optional, see [ ` tls.createServer() ` ] [ ]
469- * ` session ` {Buffer} An optional ` Buffer ` instance containing a TLS session.
464+ (` isServer ` is true) may set ` requestCert ` to true to request a client
465+ certificate.
466+ * ` rejectUnauthorized ` : See [ ` tls.createServer() ` ] [ ]
467+ * ` ALPNProtocols ` : See [ ` tls.createServer() ` ] [ ]
468+ * ` SNICallback ` : See [ ` tls.createServer() ` ] [ ]
469+ * ` session ` {Buffer} A ` Buffer ` instance containing a TLS session.
470470 * ` requestOCSP ` {boolean} If ` true ` , specifies that the OCSP status request
471471 extension will be added to the client hello and an ` 'OCSPResponse' ` event
472472 will be emitted on the socket before establishing a secure communication
473- * ` secureContext ` : Optional TLS context object created with
473+ * ` secureContext ` : TLS context object created with
474474 [ ` tls.createSecureContext() ` ] [ ] . If a ` secureContext ` is _ not_ provided, one
475475 will be created by passing the entire ` options ` object to
476476 ` tls.createSecureContext() ` .
477- * ...: Optional [ ` tls.createSecureContext() ` ] [ ] options that are used if the
478- ` secureContext ` option is missing, otherwise they are ignored.
477+ * ...: [ ` tls.createSecureContext() ` ] [ ] options that are used if the
478+ ` secureContext ` option is missing. Otherwise, they are ignored.
479479
480480Construct a new ` tls.TLSSocket ` object from an existing TCP socket.
481481
@@ -903,13 +903,13 @@ changes:
903903 TLS connection. When a server offers a DH parameter with a size less
904904 than ` minDHSize ` , the TLS connection is destroyed and an error is thrown.
905905 ** Default:** ` 1024 ` .
906- * ` secureContext ` : Optional TLS context object created with
906+ * ` secureContext ` : TLS context object created with
907907 [ ` tls.createSecureContext() ` ] [ ] . If a ` secureContext ` is _ not_ provided, one
908908 will be created by passing the entire ` options ` object to
909909 ` tls.createSecureContext() ` .
910910 * ` lookup ` : {Function} Custom lookup function. ** Default:**
911911 [ ` dns.lookup() ` ] [ ] .
912- * ...: Optional [ ` tls.createSecureContext() ` ] [ ] options that are used if the
912+ * ...: [ ` tls.createSecureContext() ` ] [ ] options that are used if the
913913 ` secureContext ` option is missing, otherwise they are ignored.
914914* ` callback ` {Function}
915915
@@ -993,7 +993,7 @@ added: v0.11.3
993993-->
994994
995995* ` port ` {number} Default value for ` options.port ` .
996- * ` host ` {string} Optional default value for ` options.host ` .
996+ * ` host ` {string} Default value for ` options.host ` .
997997* ` options ` {Object} See [ ` tls.connect() ` ] [ ] .
998998* ` callback ` {Function} See [ ` tls.connect() ` ] [ ] .
999999
@@ -1037,21 +1037,21 @@ changes:
10371037 certificate can match or chain to.
10381038 For self-signed certificates, the certificate is its own CA, and must be
10391039 provided.
1040- * ` cert ` {string|string[ ] |Buffer|Buffer[ ] } Optional cert chains in PEM format.
1041- One cert chain should be provided per private key. Each cert chain should
1042- consist of the PEM formatted certificate for a provided private ` key ` ,
1043- followed by the PEM formatted intermediate certificates (if any), in order,
1044- and not including the root CA (the root CA must be pre-known to the peer,
1045- see ` ca ` ). When providing multiple cert chains, they do not have to be in
1046- the same order as their private keys in ` key ` . If the intermediate
1047- certificates are not provided, the peer will not be able to validate the
1048- certificate, and the handshake will fail.
1049- * ` ciphers ` {string} Optional cipher suite specification, replacing the
1050- default. For more information, see [ modifying the default cipher suite] [ ] .
1051- * ` clientCertEngine ` {string} Optional name of an OpenSSL engine which can
1052- provide the client certificate.
1053- * ` crl ` {string|string[ ] |Buffer|Buffer[ ] } Optional PEM formatted
1054- CRLs (Certificate Revocation Lists).
1040+ * ` cert ` {string|string[ ] |Buffer|Buffer[ ] } Cert chains in PEM format. One cert
1041+ chain should be provided per private key. Each cert chain should consist of
1042+ the PEM formatted certificate for a provided private ` key ` , followed by the
1043+ PEM formatted intermediate certificates (if any), in order, and not
1044+ including the root CA (the root CA must be pre-known to the peer, see ` ca ` ).
1045+ When providing multiple cert chains, they do not have to be in the same
1046+ order as their private keys in ` key ` . If the intermediate certificates are
1047+ not provided, the peer will not be able to validate the certificate, and the
1048+ handshake will fail.
1049+ * ` ciphers ` {string} Cipher suite specification, replacing the default. For
1050+ more information, see [ modifying the default cipher suite] [ ] .
1051+ * ` clientCertEngine ` {string} Name of an OpenSSL engine which can provide the
1052+ client certificate.
1053+ * ` crl ` {string|string[ ] |Buffer|Buffer[ ] } PEM formatted CRLs (Certificate
1054+ Revocation Lists).
10551055 * ` dhparam ` {string|Buffer} Diffie Hellman parameters, required for
10561056 [ Perfect Forward Secrecy] [ ] . Use ` openssl dhparam ` to create the parameters.
10571057 The key length must be greater than or equal to 1024 bits, otherwise an
@@ -1069,19 +1069,19 @@ changes:
10691069 preferences instead of the client's. When ` true ` , causes
10701070 ` SSL_OP_CIPHER_SERVER_PREFERENCE ` to be set in ` secureOptions ` , see
10711071 [ OpenSSL Options] [ ] for more information.
1072- * ` key ` {string|string[ ] |Buffer|Buffer[ ] |Object[ ] } Optional private keys in
1073- PEM format. PEM allows the option of private keys being encrypted. Encrypted
1074- keys will be decrypted with ` options.passphrase ` . Multiple keys using
1075- different algorithms can be provided either as an array of unencrypted key
1076- strings or buffers, or an array of objects in the form `{pem:
1077- <string|buffer> [ , passphrase: <string >] }`. The object form can only occur in
1078- an array. ` object.passphrase ` is optional. Encrypted keys will be decrypted
1079- with ` object.passphrase ` if provided, or ` options.passphrase ` if it is not.
1080- * ` passphrase ` {string} Optional shared passphrase used for a single private
1081- key and/or a PFX.
1082- * ` pfx ` {string|string[ ] |Buffer|Buffer[ ] |Object[ ] } Optional PFX or PKCS12
1083- encoded private key and certificate chain. ` pfx ` is an alternative to
1084- providing ` key ` and ` cert ` individually. PFX is usually encrypted, if it is,
1072+ * ` key ` {string|string[ ] |Buffer|Buffer[ ] |Object[ ] } Private keys in PEM format.
1073+ PEM allows the option of private keys being encrypted. Encrypted keys will
1074+ be decrypted with ` options.passphrase ` . Multiple keys using different
1075+ algorithms can be provided either as an array of unencrypted key strings or
1076+ buffers, or an array of objects in the form `{pem: <string|buffer> [ ,
1077+ passphrase: <string >] }`. The object form can only occur in an array.
1078+ ` object.passphrase ` is optional. Encrypted keys will be decrypted with
1079+ ` object.passphrase ` if provided, or ` options.passphrase ` if it is not.
1080+ * ` passphrase ` {string} Shared passphrase used for a single private key and/or
1081+ a PFX.
1082+ * ` pfx ` {string|string[ ] |Buffer|Buffer[ ] |Object[ ] } PFX or PKCS12 encoded
1083+ private key and certificate chain. ` pfx ` is an alternative to providing
1084+ ` key ` and ` cert ` individually. PFX is usually encrypted, if it is,
10851085 ` passphrase ` will be used to decrypt it. Multiple PFX can be provided either
10861086 as an array of unencrypted PFX buffers, or an array of objects in the form
10871087 ` {buf: <string|buffer>[, passphrase: <string>]} ` . The object form can only
@@ -1092,12 +1092,11 @@ changes:
10921092 which is not usually necessary. This should be used carefully if at all!
10931093 Value is a numeric bitmask of the ` SSL_OP_* ` options from
10941094 [ OpenSSL Options] [ ] .
1095- * ` secureProtocol ` {string} Optional SSL method to use. The possible values
1096- are listed as [ SSL_METHODS] [ ] , use the function names as strings.
1097- For example, ` 'TLSv1_2_method' ` to force TLS version 1.2. ** Default:**
1098- ` 'TLS_method' ` .
1099- * ` sessionIdContext ` {string} Optional opaque identifier used by servers to
1100- ensure session state is not shared between applications. Unused by clients.
1095+ * ` secureProtocol ` {string} SSL method to use. The possible values are listed
1096+ as [ SSL_METHODS] [ ] , use the function names as strings. For example,
1097+ ` 'TLSv1_2_method' ` to force TLS version 1.2. ** Default:** ` 'TLS_method' ` .
1098+ * ` sessionIdContext ` {string} Opaque identifier used by servers to ensure
1099+ session state is not shared between applications. Unused by clients.
11011100
11021101[ ` tls.createServer() ` ] [ ] sets the default value of the ` honorCipherOrder ` option
11031102to ` true ` , other APIs that create secure contexts leave it unset.
@@ -1138,8 +1137,8 @@ changes:
11381137 first byte is the length of the next protocol name. Passing an array is
11391138 usually much simpler, e.g. ` ['hello', 'world'] ` .
11401139 (Protocols should be ordered by their priority.)
1141- * ` clientCertEngine ` {string} Optional name of an OpenSSL engine which can
1142- provide the client certificate.
1140+ * ` clientCertEngine ` {string} Name of an OpenSSL engine which can provide the
1141+ client certificate.
11431142 * ` handshakeTimeout ` {number} Abort the connection if the SSL/TLS handshake
11441143 does not finish in the specified number of milliseconds.
11451144 A ` 'tlsClientError' ` is emitted on the ` tls.Server ` object whenever
@@ -1322,16 +1321,15 @@ changes:
13221321* ` rejectUnauthorized ` {boolean} If not ` false ` a server automatically reject
13231322 clients with invalid certificates. Only applies when ` isServer ` is ` true ` .
13241323* ` options `
1325- * ` secureContext ` : An optional TLS context object from
1326- [ ` tls.createSecureContext() ` ] [ ]
1324+ * ` secureContext ` : A TLS context object from [ ` tls.createSecureContext() ` ] [ ]
13271325 * ` isServer ` : If ` true ` the TLS socket will be instantiated in server-mode.
13281326 ** Default:** ` false ` .
1329- * ` server ` {net.Server} An optional [ ` net.Server ` ] [ ] instance
1330- * ` requestCert ` : Optional, see [ ` tls.createServer() ` ] [ ]
1331- * ` rejectUnauthorized ` : Optional, see [ ` tls.createServer() ` ] [ ]
1332- * ` ALPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
1333- * ` SNICallback ` : Optional, see [ ` tls.createServer() ` ] [ ]
1334- * ` session ` {Buffer} An optional ` Buffer ` instance containing a TLS session.
1327+ * ` server ` {net.Server} A [ ` net.Server ` ] [ ] instance
1328+ * ` requestCert ` : See [ ` tls.createServer() ` ] [ ]
1329+ * ` rejectUnauthorized ` : See [ ` tls.createServer() ` ] [ ]
1330+ * ` ALPNProtocols ` : See [ ` tls.createServer() ` ] [ ]
1331+ * ` SNICallback ` : See [ ` tls.createServer() ` ] [ ]
1332+ * ` session ` {Buffer} A ` Buffer ` instance containing a TLS session.
13351333 * ` requestOCSP ` {boolean} If ` true ` , specifies that the OCSP status request
13361334 extension will be added to the client hello and an ` 'OCSPResponse' ` event
13371335 will be emitted on the socket before establishing a secure communication.
0 commit comments