| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f0be053 commit 0e862da
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -376,8 +376,8 @@ more information. | |||
| 376 | 376 | added: v0.3.2 | |
| 377 | 377 | --> | |
| 378 | 378 | ||
| 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. | ||
| 381 | 381 | ||
| 382 | 382 | The `server.close()` method stops the server from accepting new connections. | |
| 383 | 383 | ||
@@ -458,24 +458,24 @@ changes: | |||
| 458 | 458 | * `isServer`: The SSL/TLS protocol is asymmetrical, TLSSockets must know if | |
| 459 | 459 | they are to behave as a server or a client. If `true` the TLS socket will be | |
| 460 | 460 | instantiated as a server. **Default:** `false`. | |
| 461 | - * `server` {net.Server} An optional [`net.Server`][] instance. | ||
| 461 | + * `server` {net.Server} A [`net.Server`][] instance. | ||
| 462 | 462 | * `requestCert`: Whether to authenticate the remote peer by requesting a | |
| 463 | 463 | 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. | ||
| 470 | 470 | * `requestOCSP` {boolean} If `true`, specifies that the OCSP status request | |
| 471 | 471 | extension will be added to the client hello and an `'OCSPResponse'` event | |
| 472 | 472 | 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 | ||
| 474 | 474 | [`tls.createSecureContext()`][]. If a `secureContext` is _not_ provided, one | |
| 475 | 475 | will be created by passing the entire `options` object to | |
| 476 | 476 | `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. | ||
| 479 | 479 | ||
| 480 | 480 | Construct a new `tls.TLSSocket` object from an existing TCP socket. | |
| 481 | 481 | ||
@@ -903,13 +903,13 @@ changes: | |||
| 903 | 903 | TLS connection. When a server offers a DH parameter with a size less | |
| 904 | 904 | than `minDHSize`, the TLS connection is destroyed and an error is thrown. | |
| 905 | 905 | **Default:** `1024`. | |
| 906 | - * `secureContext`: Optional TLS context object created with | ||
| 906 | + * `secureContext`: TLS context object created with | ||
| 907 | 907 | [`tls.createSecureContext()`][]. If a `secureContext` is _not_ provided, one | |
| 908 | 908 | will be created by passing the entire `options` object to | |
| 909 | 909 | `tls.createSecureContext()`. | |
| 910 | 910 | * `lookup`: {Function} Custom lookup function. **Default:** | |
| 911 | 911 | [`dns.lookup()`][]. | |
| 912 | - * ...: Optional [`tls.createSecureContext()`][] options that are used if the | ||
| 912 | + * ...: [`tls.createSecureContext()`][] options that are used if the | ||
| 913 | 913 | `secureContext` option is missing, otherwise they are ignored. | |
| 914 | 914 | * `callback` {Function} | |
| 915 | 915 | ||
@@ -993,7 +993,7 @@ added: v0.11.3 | |||
| 993 | 993 | --> | |
| 994 | 994 | ||
| 995 | 995 | * `port` {number} Default value for `options.port`. | |
| 996 | - * `host` {string} Optional default value for `options.host`. | ||
| 996 | + * `host` {string} Default value for `options.host`. | ||
| 997 | 997 | * `options` {Object} See [`tls.connect()`][]. | |
| 998 | 998 | * `callback` {Function} See [`tls.connect()`][]. | |
| 999 | 999 | ||
@@ -1037,21 +1037,21 @@ changes: | |||
| 1037 | 1037 | certificate can match or chain to. | |
| 1038 | 1038 | For self-signed certificates, the certificate is its own CA, and must be | |
| 1039 | 1039 | 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). | ||
| 1055 | 1055 | * `dhparam` {string|Buffer} Diffie Hellman parameters, required for | |
| 1056 | 1056 | [Perfect Forward Secrecy][]. Use `openssl dhparam` to create the parameters. | |
| 1057 | 1057 | The key length must be greater than or equal to 1024 bits, otherwise an | |
@@ -1069,19 +1069,19 @@ changes: | |||
| 1069 | 1069 | preferences instead of the client's. When `true`, causes | |
| 1070 | 1070 | `SSL_OP_CIPHER_SERVER_PREFERENCE` to be set in `secureOptions`, see | |
| 1071 | 1071 | [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, | ||
| 1085 | 1085 | `passphrase` will be used to decrypt it. Multiple PFX can be provided either | |
| 1086 | 1086 | as an array of unencrypted PFX buffers, or an array of objects in the form | |
| 1087 | 1087 | `{buf: <string|buffer>[, passphrase: <string>]}`. The object form can only | |
@@ -1092,12 +1092,11 @@ changes: | |||
| 1092 | 1092 | which is not usually necessary. This should be used carefully if at all! | |
| 1093 | 1093 | Value is a numeric bitmask of the `SSL_OP_*` options from | |
| 1094 | 1094 | [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. | ||
| 1101 | 1100 | ||
| 1102 | 1101 | [`tls.createServer()`][] sets the default value of the `honorCipherOrder` option | |
| 1103 | 1102 | to `true`, other APIs that create secure contexts leave it unset. | |
@@ -1138,8 +1137,8 @@ changes: | |||
| 1138 | 1137 | first byte is the length of the next protocol name. Passing an array is | |
| 1139 | 1138 | usually much simpler, e.g. `['hello', 'world']`. | |
| 1140 | 1139 | (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. | ||
| 1143 | 1142 | * `handshakeTimeout` {number} Abort the connection if the SSL/TLS handshake | |
| 1144 | 1143 | does not finish in the specified number of milliseconds. | |
| 1145 | 1144 | A `'tlsClientError'` is emitted on the `tls.Server` object whenever | |
@@ -1322,16 +1321,15 @@ changes: | |||
| 1322 | 1321 | * `rejectUnauthorized` {boolean} If not `false` a server automatically reject | |
| 1323 | 1322 | clients with invalid certificates. Only applies when `isServer` is `true`. | |
| 1324 | 1323 | * `options` | |
| 1325 | - * `secureContext`: An optional TLS context object from | ||
| 1326 | - [`tls.createSecureContext()`][] | ||
| 1324 | + * `secureContext`: A TLS context object from [`tls.createSecureContext()`][] | ||
| 1327 | 1325 | * `isServer`: If `true` the TLS socket will be instantiated in server-mode. | |
| 1328 | 1326 | **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. | ||
| 1335 | 1333 | * `requestOCSP` {boolean} If `true`, specifies that the OCSP status request | |
| 1336 | 1334 | extension will be added to the client hello and an `'OCSPResponse'` event | |
| 1337 | 1335 | will be emitted on the socket before establishing a secure communication. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments