chunk_id large_stringlengths 36 36 | doc_type large_stringclasses 2
values | category large_stringclasses 17
values | document large_stringclasses 50
values | version_raw large_stringclasses 590
values | chunk_index int64 0 262 | text large_stringlengths 11 5.69k | file_path large_stringclasses 882
values |
|---|---|---|---|---|---|---|---|
2e25b779-e091-5188-bcb2-e375ffb3adc3 | docs | nodejs | nodejs_tls | 8x | 9 | on the format, see the [OpenSSL cipher list format documentation](https://www.openssl.org/docs/man1.0.2/apps/ciphers.html#CIPHER-LIST-FORMAT).
## Class: tls.Server[#](#tls_class_tls_server)
Added in: v0.3.2
The `tls.Server` class is a subclass of `net.Server` that accepts encrypted
connections using TLS or SSL.
###... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
60c38987-3e1f-5966-94c8-02afa09362f9 | docs | nodejs | nodejs_tls | 8x | 10 | established after the addition of the event listener.
### Event: 'OCSPRequest'[#](#tls_event_ocsprequest)
Added in: v0.11.13
The `'OCSPRequest'` event is emitted when the client sends a certificate status
request. The listener callback is passed three arguments when called:
* `certificate` [<Buffer>](buffer.html#bu... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
f0ac801a-9b27-515e-8567-cd492bb12e73 | docs | nodejs | nodejs_tls | 8x | 11 | certificate ID and OCSP endpoint URL.
Alternatively, `callback(null, null)` may be called, indicating that there was
no OCSP response.
Calling `callback(err)` will result in a `socket.destroy(err)` call.
The typical flow of an OCSP Request is as follows:
1. Client connects to the server and sends an `'OCSPRequest'`... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
dd98619a-51e1-5620-8e4c-d67fc546533e | docs | nodejs | nodejs_tls | 8x | 12 | via the `ca` option when establishing the TLS connection.)
*Note*: Listening for this event will have an effect only on connections
established after the addition of the event listener.
*Note*: An npm module like [asn1.js](https://npmjs.org/package/asn1.js) may be used to parse the certificates.
### Event: 'resumeSe... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
2ad7bd62-37b2-5158-837e-645eaa7d4a25 | docs | nodejs | nodejs_tls | 8x | 13 | be invoked as `callback(null, null)`. Calling `callback(err)` will terminate the
incoming connection and destroy the socket.
*Note*: Listening for this event will have an effect only on connections
established after the addition of the event listener.
The following illustrates resuming a TLS session:
```None
const t... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
8e17aa3f-4b23-5adc-a6c4-705059b2ac89 | docs | nodejs | nodejs_tls | 8x | 14 | client has been verified by one of the supplied Certificate Authorities for the
server. If `tlsSocket.authorized` is `false`, then `socket.authorizationError`
is set to describe how authorization failed. Note that depending on the settings
of the TLS server, unauthorized connections may still be accepted.
The `tlsSock... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
efef6d85-4903-53e0-9606-b7ebb4b2b048 | docs | nodejs | nodejs_tls | 8x | 15 | * `exception` [<Error>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) The `Error` object describing the error
* `tlsSocket` [<tls.TLSSocket>](tls.html#tls_class_tls_tlssocket) The `tls.TLSSocket` instance from which the
error originated.
### server.addContext(hostname, conte... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
0f3697d9-9437-51e0-96cf-d99fb6e2aef2 | docs | nodejs | nodejs_tls | 8x | 16 | ### server.address()[#](#tls_server_address)
Added in: v0.6.0
Returns the bound address, the address family name, and port of the
server as reported by the operating system. See [`net.Server.address()`](net.html#net_server_address) for
more information.
### server.close([callback])[#](#tls_server_close_callback)
Ad... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
e963a641-657d-57b9-b911-fafdae0e43db | docs | nodejs | nodejs_tls | 8x | 17 | Returns the current number of concurrent connections on the server.
### server.getTicketKeys()[#](#tls_server_getticketkeys)
Added in: v3.0.0
Returns a `Buffer` instance holding the keys currently used for
encryption/decryption of the [TLS Session Tickets](https://www.ietf.org/rfc/rfc5077.txt)
### server.listen()[#... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
d80c4ca7-0766-5861-b6bc-065a13584f9c | docs | nodejs | nodejs_tls | 8x | 18 | [tls.createServer](#tls_tls_createserver_options_secureconnectionlistener) for
more information on how it is used.
*Note*: Changes to the ticket keys are effective only for future server
connections. Existing or currently pending server connections will use the
previous keys.
## Class: tls.TLSSocket[#](#tls_class_tls... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
7048c1fe-564f-5edb-9797-238f7fc153b4 | docs | nodejs | nodejs_tls | 8x | 19 | ### new tls.TLSSocket(socket[, options])[#](#tls_new_tls_tlssocket_socket_options)
History
| Version | Changes |
| --- | --- |
| v5.0.0 | ALPN options are supported now. |
| v0.11.4 | Added in: v0.11.4 |
* `socket` [<net.Socket>](net.html#net_class_net_socket) | [<stream.Duplex>](stream.html#stream_class_stream_dupl... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
12652a8b-fc4a-55b7-be1a-07c62e792b0c | docs | nodejs | nodejs_tls | 8x | 20 | + `server` [<net.Server>](net.html#net_class_net_server) An optional [`net.Server`](net.html#net_class_net_server) instance.
+ `requestCert`: Whether to authenticate the remote peer by requesting a
certificate. Clients always request a server certificate. Servers
(`isServer` is true) may optionally set `req... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
b1a2953d-e01b-5db8-a8d0-faec9b708a84 | docs | nodejs | nodejs_tls | 8x | 21 | + `requestOCSP` [<boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) If `true`, specifies that the OCSP status request
extension will be added to the client hello and an `'OCSPResponse'` event
will be emitted on the socket before establishing a secure communication... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
0a551b0d-6f55-5e5c-a54d-866bae55cfcd | docs | nodejs | nodejs_tls | 8x | 22 | ### Event: 'OCSPResponse'[#](#tls_event_ocspresponse)
Added in: v0.11.13
The `'OCSPResponse'` event is emitted if the `requestOCSP` option was set
when the `tls.TLSSocket` was created and an OCSP response has been received.
The listener callback is passed a single argument when called:
* `response` [<Buffer>](buffer... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
ffd20717-4166-53ce-8c1f-9388cd1995d9 | docs | nodejs | nodejs_tls | 8x | 23 | `tlsSocket.authorized === false`, then the error can be found by examining the
`tlsSocket.authorizationError` property. If either ALPN or NPN was used,
the `tlsSocket.alpnProtocol` or `tlsSocket.npnProtocol` properties can be
checked to determine the negotiated protocol.
### tlsSocket.address()[#](#tls_tlssocket_addre... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
d989e23b-f088-5968-b1b1-5e2d616d567c | docs | nodejs | nodejs_tls | 8x | 24 | ### tlsSocket.disableRenegotiation()[#](#tls_tlssocket_disablerenegotiation)
Added in: v8.4.0
Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts
to renegotiate will trigger an `'error'` event on the `TLSSocket`.
### tlsSocket.encrypted[#](#tls_tlssocket_encrypted)
Added in: v0.11.4
Alw... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
f5091b50-95d1-52c9-8524-4eb568d4c263 | docs | nodejs | nodejs_tls | 8x | 25 | ### tlsSocket.getEphemeralKeyInfo()[#](#tls_tlssocket_getephemeralkeyinfo)
Added in: v5.0.0
Returns an object representing the type, name, and size of parameter of
an ephemeral key exchange in [Perfect Forward Secrecy](#tls_perfect_forward_secrecy) on a client
connection. It returns an empty object when the key excha... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
069dafef-7d92-57de-96ba-7131a7390ba5 | docs | nodejs | nodejs_tls | 8x | 26 | As the `Finished` messages are message digests of the complete handshake
(with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
be used for external authentication procedures when the authentication
provided by SSL/TLS is not desired or is not enough.
Corresponds to the `SSL_get_finished` routine in Ope... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
15073c1e-531d-5e03-be51-6cd2a0676562 | docs | nodejs | nodejs_tls | 8x | 27 | `issuerCertificate` property containing an object representing its issuer's
certificate.
For example:
```None
{ subject:
{ C: 'UK',
ST: 'Acknack Ltd',
L: 'Rhys Jones',
O: 'node.js',
OU: 'Test TLS Certificate',
CN: 'localhost' },
issuer:
{ C: 'UK',
ST: 'Acknack Ltd',
L: 'Rhys... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
4d29765d-904f-5adb-b95b-9f4999a139dc | docs | nodejs | nodejs_tls | 8x | 28 | ### tlsSocket.getPeerFinished()[#](#tls_tlssocket_getpeerfinished)
Added in: v8.12.0
* Returns: [<Buffer>](buffer.html#buffer_class_buffer) | [<undefined>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type) The latest `Finished` message that is expected
or has actually been rece... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
d7d60e3a-f8e1-5096-a3f8-ec2f1e506ab5 | docs | nodejs | nodejs_tls | 8x | 29 | ### tlsSocket.getProtocol()[#](#tls_tlssocket_getprotocol)
Added in: v5.7.0
Returns a string containing the negotiated SSL/TLS protocol version of the
current connection. The value `'unknown'` will be returned for connected
sockets that have not completed the handshaking process. The value `null` will
be returned for... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
ea79b1e0-16ad-5ea0-9c2c-cd520ebd3efd | docs | nodejs | nodejs_tls | 8x | 30 | for session reuse provide `session` option to [`tls.connect()`](#tls_tls_connect_options_callback).
### tlsSocket.localAddress[#](#tls_tlssocket_localaddress)
Added in: v0.11.4
Returns the string representation of the local IP address.
### tlsSocket.localPort[#](#tls_tlssocket_localport)
Added in: v0.11.4
Returns... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
b22164b8-8b94-51eb-b598-01949216423b | docs | nodejs | nodejs_tls | 8x | 31 | ### tlsSocket.renegotiate(options, callback)[#](#tls_tlssocket_renegotiate_options_callback)
Added in: v0.11.8
* `options` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
+ `rejectUnauthorized` [<boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Da... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
7f463eed-b208-50d1-9e31-78398fe9ef0f | docs | nodejs | nodejs_tls | 8x | 32 | *Note*: This method can be used to request a peer's certificate after the
secure connection has been established.
*Note*: When running as the server, the socket will be destroyed with an error
after `handshakeTimeout` timeout.
### tlsSocket.setMaxSendFragment(size)[#](#tls_tlssocket_setmaxsendfragment_size)
Added in... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
fad5300e-7df5-54ae-b106-ea80bf484dc3 | docs | nodejs | nodejs_tls | 8x | 33 | smaller fragments add extra TLS framing bytes and CPU overhead, which may
decrease overall server throughput.
## tls.checkServerIdentity(host, cert)[#](#tls_tls_checkserveridentity_host_cert)
Added in: v0.8.4
* `host` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) The... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
aec555e2-d3ed-56c9-a6d8-a523a7367282 | docs | nodejs | nodejs_tls | 8x | 34 | *Note*: This function can be overwritten by providing alternative function
as part of the `options.checkServerIdentity` option passed to `tls.connect()`.
The overwriting function can call `tls.checkServerIdentity()` of course, to augment
the checks done with additional verification.
*Note*: This function is only calle... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
477d926c-eb9d-54e6-a99b-002117b7836b | docs | nodejs | nodejs_tls | 8x | 35 | modulus: 'B56CE45CB740B09A13F64AC543B712FF9EE8E4C284B542A1708A27E82A8D151CA178153E12E6DDA15BF70FFD96CB8A88618641BDFCCA03527E665B70D779C8A349A6F88FD4EF6557180BD4C98192872BCFE3AF56E863C09DDD8BC1EC58DF9D94F914F0369102B2870BECFA1348A0838C9C49BD1C20124B442477572347047506B1FCD658A80D0C44BCC16BC5C5496CFE6E4A8428EF654CD3D897... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
a6e38550-1b5e-5fa8-b009-f78df449499b | docs | nodejs | nodejs_tls | 8x | 36 | exponent: '0x10001',
valid_from: 'Aug 14 00:00:00 2017 GMT',
valid_to: 'Nov 20 23:59:59 2019 GMT',
fingerprint: '01:02:59:D9:C3:D2:0D:08:F7:82:4E:44:A4:B4:53:C5:E2:3A:87:4D',
ext_key_usage: [ '1.3.6.1.5.5.7.3.1', '1.3.6.1.5.5.7.3.2' ],
serialNumber: '66593D57F20CBC573E433381B5FEC280',
raw: <Buffer ....> }... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
205cb36c-7c86-5d17-a1e2-ef10b3810b31 | docs | nodejs | nodejs_tls | 8x | 37 | + `port` [<number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) Port the client should connect to.
+ `path` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) Creates unix socket connection to path. If this option is
specified... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
a18eceeb-08db-5eb4-90bc-dc7928658a24 | docs | nodejs | nodejs_tls | 8x | 38 | + `rejectUnauthorized` [<boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) If not `false`, the server certificate is
verified against the list of supplied CAs. An `'error'` event is emitted if
verification fails; `err.code` contains the OpenSSL error code. **Defau... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
1f46e677-201c-5b3d-b24b-105b7e0ff8b1 | docs | nodejs | nodejs_tls | 8x | 39 | first byte is the length of the next protocol name. Passing an array is
usually much simpler, e.g. `['hello', 'world']`.
+ `ALPNProtocols`: [<string[]>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<Buffer[]>](buffer.html#buffer_class_buffer) | [<Uint8Array[]>](https... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
cf9d960c-2fba-5d5f-b1ad-01d07d855b44 | docs | nodejs | nodejs_tls | 8x | 40 | + `servername`: [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) Server name for the SNI (Server Name Indication) TLS
extension.
+ `checkServerIdentity(servername, cert)` [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
86000ab0-ece4-55f7-a27d-9243e93f6cc7 | docs | nodejs | nodejs_tls | 8x | 41 | + `minDHSize` [<number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) Minimum size of the DH parameter in bits to accept a
TLS connection. When a server offers a DH parameter with a size less
than `minDHSize`, the TLS connection is destroyed and an error is thrown.
... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
27648689-e135-5ad2-8e3e-c439ce6309ed | docs | nodejs | nodejs_tls | 8x | 42 | * `callback` [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)
The `callback` function, if specified, will be added as a listener for the
[`'secureConnect'`](#tls_event_secureconnect) event.
`tls.connect()` returns a [`tls.TLSSocket`](#tls_class_tls_tlssocket) obj... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
dff04882-25e3-5988-b2c9-b3bde2659759 | docs | nodejs | nodejs_tls | 8x | 43 | });
socket.on('end', () => {
server.close();
});
```
Or
```None
const tls = require('tls');
const fs = require('fs');
const options = {
pfx: fs.readFileSync('client.pfx')
};
const socket = tls.connect(8000, options, () => {
console.log('client connected',
socket.authorized ? 'authorized' : 'unau... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
931dbb23-4117-59f3-b12f-71f5a9664735 | docs | nodejs | nodejs_tls | 8x | 44 | * `callback` [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) See [`tls.connect()`](#tls_tls_connect_options_callback).
Same as [`tls.connect()`](#tls_tls_connect_options_callback) except that `path` can be provided
as an argument instead of an option.
*Note*: A ... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
9b7045f1-322c-5d49-b717-fe3da22e155b | docs | nodejs | nodejs_tls | 8x | 45 | * `callback` [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) See [`tls.connect()`](#tls_tls_connect_options_callback).
Same as [`tls.connect()`](#tls_tls_connect_options_callback) except that `port` and `host` can be provided
as arguments instead of options.
*No... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
1eb1c9b1-c1d2-5519-bd12-1072c34e9d68 | docs | nodejs | nodejs_tls | 8x | 46 | + `pfx` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<string[]>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<Buffer>](buffer.html#buffer_class_buffer) | [<Buffer[]>](buffer.html#buffer_class_buffer) | [<Object[]>](https... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
05627d29-b8b8-5933-83e1-77974046dbf6 | docs | nodejs | nodejs_tls | 8x | 47 | + `key` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<string[]>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<Buffer>](buffer.html#buffer_class_buffer) | [<Buffer[]>](buffer.html#buffer_class_buffer) | [<Object[]>](https... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
bf684ed1-9e54-59ab-8120-20414f4cb9a7 | docs | nodejs | nodejs_tls | 8x | 48 | + `passphrase` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) Optional shared passphrase used for a single private
key and/or a PFX.
+ `cert` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<string[]>](https://de... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
266af017-45c0-5f23-8d29-9f615527b36f | docs | nodejs | nodejs_tls | 8x | 49 | certificates are not provided, the peer will not be able to validate the
certificate, and the handshake will fail.
+ `ca` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<string[]>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Strin... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
44c45fc9-01b4-5132-bb84-730147d91aed | docs | nodejs | nodejs_tls | 8x | 50 | must be explicitly specified as a trusted or the connection will fail to
authenticate.
If the peer uses a certificate that doesn't match or chain to one of the
default CAs, use the `ca` option to provide a CA certificate that the peer's
certificate can match or chain to.
For self-signed certific... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
54e020dd-139a-5b10-8078-f36898cd1887 | docs | nodejs | nodejs_tls | 8x | 51 | default. For more information, see [modifying the default cipher suite](#tls_modifying_the_default_tls_cipher_suite).
+ `honorCipherOrder` [<boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Attempt to use the server's cipher suite
preferences instead of the clien... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
5ca8ad38-49eb-55b9-a538-b06bd6807bb9 | docs | nodejs | nodejs_tls | 8x | 52 | will also display the name and description of each available elliptic curve.
**Default:** [`tls.DEFAULT_ECDH_CURVE`](#tls_tls_default_ecdh_curve).
+ `dhparam` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<Buffer>](buffer.html#buffer_class_buffer) Diffie He... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
bddd34d8-df3b-5abb-bd02-6f0aa6dfc602 | docs | nodejs | nodejs_tls | 8x | 53 | `'SSLv23_method'`. The possible values are listed as [SSL\_METHODS](https://www.openssl.org/docs/man1.0.2/ssl/ssl.html#DEALING-WITH-PROTOCOL-METHODS), use
the function names as strings. For example, `'SSLv3_method'` to force SSL
version 3.
+ `secureOptions` [<number>](https://developer.mozilla.org/en-US/d... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
655c6b58-d68f-592a-b5a9-1ec0493cdc8e | docs | nodejs | nodejs_tls | 8x | 54 | `honorCipherOrder` option to `true`, other APIs that create secure contexts
leave it unset.
* [`tls.createServer()`](#tls_tls_createserver_options_secureconnectionlistener) uses a 128 bit truncated SHA1 hash value
generated from `process.argv` as the default value of the `sessionIdContext`
option, other APIs th... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
6c3be9f2-98f0-56fe-901b-e195c73ba6f5 | docs | nodejs | nodejs_tls | 8x | 55 | | v5.0.0 | ALPN options are supported now. |
| v0.3.2 | Added in: v0.3.2 |
* `options` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
+ `handshakeTimeout` [<number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) Abort the con... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
ffdf33cf-2ba3-55ce-994e-49edf735630f | docs | nodejs | nodejs_tls | 8x | 56 | connection which is not authorized with the list of supplied CAs. This
option only has an effect if `requestCert` is `true`. **Default:** `true`.
+ `NPNProtocols` [<string[]>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<Buffer[]>](buffer.html#buffer_class_buffer) |... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
588013ec-5d83-5ba6-871d-5bcad5a98a5d | docs | nodejs | nodejs_tls | 8x | 57 | + `ALPNProtocols`: [<string[]>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<Buffer[]>](buffer.html#buffer_class_buffer) | [<Uint8Array[]>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | [<Buffer>](buffer.html#buffer_class_buf... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
1d8556a7-ec17-584b-88be-708b2b82e826 | docs | nodejs | nodejs_tls | 8x | 58 | extension to the client.
+ `SNICallback(servername, cb)` [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) A function that will be called if
the client supports SNI TLS extension. Two arguments will be passed when
called: `servername` and `cb`. `SNICal... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
a960c951-4cc9-5bdc-8176-4b10c2649c21 | docs | nodejs | nodejs_tls | 8x | 59 | + `ticketKeys`: A 48-byte `Buffer` instance consisting of a 16-byte prefix,
a 16-byte HMAC key, and a 16-byte AES key. This can be used to accept TLS
session tickets on multiple instances of the TLS server.
+ ...: Any [`tls.createSecureContext()`](#tls_tls_createsecurecontext_options) options can be provide... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
50e78bff-1fa2-5397-9f36-826e13284cd3 | docs | nodejs | nodejs_tls | 8x | 60 | cert: fs.readFileSync('server-cert.pem'),
// This is necessary only if using the client certificate authentication.
requestCert: true,
// This is necessary only if the client uses the self-signed certificate.
ca: [ fs.readFileSync('client-cert.pem') ]
};
const server = tls.createServer(options, (socket) =>... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
3f3ea750-1e23-542d-85bf-4c5249b46fea | docs | nodejs | nodejs_tls | 8x | 61 | socket.pipe(socket);
});
server.listen(8000, () => {
console.log('server bound');
});
```
This server can be tested by connecting to it using `openssl s_client`:
```None
openssl s_client -connect 127.0.0.1:8000
```
## tls.getCiphers()[#](#tls_tls_getciphers)
Added in: v0.10.2
Returns an array with the names of... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
6205e16b-c1f1-5d85-99b0-3b06f54f34fe | docs | nodejs | nodejs_tls | 8x | 62 | ## Deprecated APIs[#](#tls_deprecated_apis)
### Class: CryptoStream[#](#tls_class_cryptostream)
Added in: v0.3.4Deprecated since: v0.11.3
[Stability: 0](documentation.html#documentation_stability_index) - Deprecated: Use [`tls.TLSSocket`](#tls_class_tls_tlssocket) instead.
The `tls.CryptoStream` class represents a ... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
855521ad-c7cb-5d31-a394-91ddf3ef7671 | docs | nodejs | nodejs_tls | 8x | 63 | Returned by [`tls.createSecurePair()`](#tls_tls_createsecurepair_context_isserver_requestcert_rejectunauthorized_options).
#### Event: 'secure'[#](#tls_event_secure)
Added in: v0.3.2Deprecated since: v0.11.3
The `'secure'` event is emitted by the `SecurePair` object once a secure
connection has been established.
As... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
5712a574-1744-5808-9f1f-fd2a254867ff | docs | nodejs | nodejs_tls | 8x | 64 | * `context` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) A secure context object as returned by
`tls.createSecureContext()`
* `isServer` [<boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) `true` to specify that this ... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
f7a18d4b-f04e-54b9-a7ca-9aca3e45e4fa | docs | nodejs | nodejs_tls | 8x | 65 | + `isServer`: If `true` the TLS socket will be instantiated in server-mode.
**Default:** `false`.
+ `server` [<net.Server>](net.html#net_class_net_server) An optional [`net.Server`](net.html#net_class_net_server) instance
+ `requestCert`: Optional, see [`tls.createServer()`](#tls_tls_createserver_options_secu... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
cd5e8d57-b288-5fbc-8477-8fa072c6ec77 | docs | nodejs | nodejs_tls | 8x | 66 | + `requestOCSP` [<boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) If `true`, specifies that the OCSP status request
extension will be added to the client hello and an `'OCSPResponse'` event
will be emitted on the socket before establishing a secure communication... | large_dataset/raw/docs/nodejs/tls/tls_8x.md |
4eaefaab-6692-5679-a1a7-8804edb87ab5 | docs | nodejs | nodejs_tls | 8x | 67 | pair.encrypted.pipe(socket);
socket.pipe(pair.encrypted);
```
can be replaced by:
```None
secure_socket = tls.TLSSocket(socket, options);
```
where `secure_socket` has the same API as `pair.cleartext`.
| large_dataset/raw/docs/nodejs/tls/tls_8x.md |
48862da1-bc06-50d7-b66f-d0fe17e3a373 | docs | nodejs | nodejs_tls | 9x | 0 | # TLS (SSL)#
Source: https://nodejs.org/docs/latest-v9.x/api/tls.html
Version: 9.x
[Stability: 2](documentation.html#documentation_stability_index) - Stable
The `tls` module provides an implementation of the Transport Layer Security
(TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.
The m... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
264f5f8a-d026-58b7-8a6d-0436514ae6f0 | docs | nodejs | nodejs_tls | 9x | 1 | private key (such certificates are referred to as "self-signed"). The first
step to obtaining a certificate is to create a *Certificate Signing Request*
(CSR) file.
The OpenSSL command-line interface can be used to generate a CSR for a private
key:
```None
openssl req -new -sha256 -key ryans-key.pem -out ryans-csr.pe... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
ea068500-9912-5feb-8970-b34f074bc0bb | docs | nodejs | nodejs_tls | 9x | 2 | * `certfile`: is a concatenation of all Certificate Authority (CA) certs into
a single file, e.g. `cat ca1-cert.pem ca2-cert.pem > ca-cert.pem`
### Perfect Forward Secrecy[#](#tls_perfect_forward_secrecy)
The term "[Forward Secrecy](https://en.wikipedia.org/wiki/Perfect_forward_secrecy)" or "Perfect Forward Secrecy... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
e2b8c1f3-d918-53b1-9572-24549af8bc12 | docs | nodejs | nodejs_tls | 9x | 3 | Currently two methods are commonly used to achieve Perfect Forward Secrecy (note
the character "E" appended to the traditional abbreviations):
* [DHE](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) - An ephemeral version of the Diffie Hellman key-agreement protocol.
* [ECDHE](https://en.wikipedia.o... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
3a7d0036-1058-54c4-a7f9-e9525d4d91a9 | docs | nodejs | nodejs_tls | 9x | 4 | not required and a default ECDHE curve will be used. The `ecdhCurve` property
can be used when creating a TLS Server to specify the list of names of supported
curves to use, see [`tls.createServer()`](#tls_tls_createserver_options_secureconnectionlistener) for more info.
### ALPN, NPN, and SNI[#](#tls_alpn_npn_and_sni... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
dacf2901-ae79-56ac-b402-b6dc037b5de5 | docs | nodejs | nodejs_tls | 9x | 5 | ### Client-initiated renegotiation attack mitigation[#](#tls_client_initiated_renegotiation_attack_mitigation)
The TLS protocol allows clients to renegotiate certain aspects of the TLS
session. Unfortunately, session renegotiation requires a disproportionate amount
of server-side resources, making it a potential vecto... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
10b0b8af-b974-509d-8b55-9e9a707e9c62 | docs | nodejs | nodejs_tls | 9x | 6 | The default renegotiation limits should not be modified without a full
understanding of the implications and risks.
To test the renegotiation limits on a server, connect to it using the OpenSSL
command-line client (`openssl s_client -connect address:port`) then input
`R<CR>` (i.e., the letter `R` followed by a carriag... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
bcb90390-c68b-5c7f-9430-24de4cec91a9 | docs | nodejs | nodejs_tls | 9x | 7 | line switch. For instance, the following makes
`ECDHE-RSA-AES128-GCM-SHA256:!RC4` the default TLS cipher suite:
```None
node --tls-cipher-list="ECDHE-RSA-AES128-GCM-SHA256:!RC4"
```
The default can also be replaced on a per client or server basis using the
`ciphers` option from [`tls.createSecureContext()`](#tls_tls_... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
2241c68f-c86c-5cc5-99b5-450c3ec8f1ae | docs | nodejs | nodejs_tls | 9x | 8 | of an application. The `--tls-cipher-list` switch and `ciphers` option should by
used only if absolutely necessary.
The default cipher suite prefers GCM ciphers for [Chrome's 'modern
cryptography' setting](https://www.chromium.org/Home/chromium-security/education/tls#TOC-Cipher-Suites) and also prefers ECDHE and DHE c... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
6d5e8326-c02f-5c3c-b2fa-af0e159935f3 | docs | nodejs | nodejs_tls | 9x | 9 | on the format, see the [OpenSSL cipher list format documentation](https://www.openssl.org/docs/man1.0.2/apps/ciphers.html#CIPHER-LIST-FORMAT).
## Class: tls.Server[#](#tls_class_tls_server)
Added in: v0.3.2
The `tls.Server` class is a subclass of `net.Server` that accepts encrypted
connections using TLS or SSL.
###... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
4d7ed782-dee6-5798-946f-3df135c66edd | docs | nodejs | nodejs_tls | 9x | 10 | after the addition of the event listener.
### Event: 'OCSPRequest'[#](#tls_event_ocsprequest)
Added in: v0.11.13
The `'OCSPRequest'` event is emitted when the client sends a certificate status
request. The listener callback is passed three arguments when called:
* `certificate` [<Buffer>](buffer.html#buffer_class_b... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
512247ec-9735-5b2a-b73e-3934ef0d862a | docs | nodejs | nodejs_tls | 9x | 11 | certificate ID and OCSP endpoint URL.
Alternatively, `callback(null, null)` may be called, indicating that there was
no OCSP response.
Calling `callback(err)` will result in a `socket.destroy(err)` call.
The typical flow of an OCSP Request is as follows:
1. Client connects to the server and sends an `'OCSPRequest'`... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
b781eed1-7bfa-55b0-9c75-7057b174073e | docs | nodejs | nodejs_tls | 9x | 12 | via the `ca` option when establishing the TLS connection.)
Listening for this event will have an effect only on connections established
after the addition of the event listener.
An npm module like [asn1.js](https://npmjs.org/package/asn1.js) may be used to parse the certificates.
### Event: 'resumeSession'[#](#tls_e... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
480a85e3-7f43-50af-957c-afbabc6df57e | docs | nodejs | nodejs_tls | 9x | 13 | be invoked as `callback(null, null)`. Calling `callback(err)` will terminate the
incoming connection and destroy the socket.
Listening for this event will have an effect only on connections established
after the addition of the event listener.
The following illustrates resuming a TLS session:
```None
const tlsSessio... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
477a0d2b-fc43-555c-a6d2-517c377075af | docs | nodejs | nodejs_tls | 9x | 14 | client has been verified by one of the supplied Certificate Authorities for the
server. If `tlsSocket.authorized` is `false`, then `socket.authorizationError`
is set to describe how authorization failed. Note that depending on the settings
of the TLS server, unauthorized connections may still be accepted.
The `tlsSock... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
9462848c-3692-57b8-a670-a616a20d1141 | docs | nodejs | nodejs_tls | 9x | 15 | * `exception` [<Error>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) The `Error` object describing the error
* `tlsSocket` [<tls.TLSSocket>](tls.html#tls_class_tls_tlssocket) The `tls.TLSSocket` instance from which the
error originated.
### server.addContext(hostname, conte... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
7944decb-14c7-5153-84cb-f1b199ef20a9 | docs | nodejs | nodejs_tls | 9x | 16 | ### server.address()[#](#tls_server_address)
Added in: v0.6.0
Returns the bound address, the address family name, and port of the
server as reported by the operating system. See [`net.Server.address()`](net.html#net_server_address) for
more information.
### server.close([callback])[#](#tls_server_close_callback)
Ad... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
e3a7a6c0-b16d-5831-98da-24a2295a3804 | docs | nodejs | nodejs_tls | 9x | 17 | Returns the current number of concurrent connections on the server.
### server.getTicketKeys()[#](#tls_server_getticketkeys)
Added in: v3.0.0
Returns a `Buffer` instance holding the keys currently used for
encryption/decryption of the [TLS Session Tickets](https://www.ietf.org/rfc/rfc5077.txt)
### server.listen()[#... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
856d21a7-1c74-56ab-833f-ed3703804e80 | docs | nodejs | nodejs_tls | 9x | 18 | [tls.createServer](#tls_tls_createserver_options_secureconnectionlistener) for
more information on how it is used.
Changes to the ticket keys are effective only for future server connections.
Existing or currently pending server connections will use the previous keys.
## Class: tls.TLSSocket[#](#tls_class_tls_tlssock... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
fc2c143f-1c3c-5d87-afaa-99bd53794121 | docs | nodejs | nodejs_tls | 9x | 19 | * `socket` [<net.Socket>](net.html#net_class_net_socket) | [<stream.Duplex>](stream.html#stream_class_stream_duplex)
On the server side, any `Duplex` stream. On the client side, any
instance of [`net.Socket`](net.html#net_class_net_socket) (for generic `Duplex` stream support
on the client side, [`tls.connect()`]... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
e552e721-e927-5f04-8e38-43385aecc2c5 | docs | nodejs | nodejs_tls | 9x | 20 | (`isServer` is true) may optionally set `requestCert` to true to request a
client certificate.
+ `rejectUnauthorized`: Optional, see [`tls.createServer()`](#tls_tls_createserver_options_secureconnectionlistener)
+ `NPNProtocols`: Optional, see [`tls.createServer()`](#tls_tls_createserver_options_secureconne... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
ef808115-048b-5aa3-9bd2-ce85c788e4da | docs | nodejs | nodejs_tls | 9x | 21 | + `secureContext`: Optional TLS context object created with
[`tls.createSecureContext()`](#tls_tls_createsecurecontext_options). If a `secureContext` is *not* provided, one
will be created by passing the entire `options` object to
`tls.createSecureContext()`.
+ ...: Optional [`tls.createSecureContext()`... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
7d5d60eb-1883-5e5b-bd11-a0a7511de9c2 | docs | nodejs | nodejs_tls | 9x | 22 | contains information about server's certificate revocation status.
### Event: 'secureConnect'[#](#tls_event_secureconnect)
Added in: v0.11.4
The `'secureConnect'` event is emitted after the handshaking process for a new
connection has successfully completed. The listener callback will be called
regardless of whether... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
5f1ee943-0052-51b0-9a6b-4316300d0427 | docs | nodejs | nodejs_tls | 9x | 23 | ### tlsSocket.address()[#](#tls_tlssocket_address)
Added in: v0.11.4
Returns the bound address, the address family name, and port of the
underlying socket as reported by the operating system. Returns an
object with three properties, e.g.
`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
### tlsSocket.authoriza... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
76251c69-0be6-5a70-97f7-501b44399b8d | docs | nodejs | nodejs_tls | 9x | 24 | ### tlsSocket.encrypted[#](#tls_tlssocket_encrypted)
Added in: v0.11.4
Always returns `true`. This may be used to distinguish TLS sockets from regular
`net.Socket` instances.
### tlsSocket.getCipher()[#](#tls_tlssocket_getcipher)
Added in: v0.11.4
Returns an object representing the cipher name. The `version` key i... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
9dedda9d-ecbf-562d-ab2c-2c1a19621d20 | docs | nodejs | nodejs_tls | 9x | 25 | if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The
`name` property is available only when type is 'ECDH'.
For Example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`
### tlsSocket.getFinished()[#](#tls_tlssocket_getfinished)
Added in: v9.9.0
* Returns: [<Buffer>](buffer.html#buffer_cl... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
5ae96468-1c70-516d-abd7-4a06759f8c8e | docs | nodejs | nodejs_tls | 9x | 26 | to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929).
### tlsSocket.getPeerCertificate([detailed])[#](#tls_tlssocket_getpeercertificate_detailed)
Added in: v0.11.4
* `detailed` [<boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_ty... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
e2fa3c02-2c5c-5cfc-b43b-04feed5728fc | docs | nodejs | nodejs_tls | 9x | 27 | CN: 'localhost' },
issuerCertificate:
{ ... another certificate, possibly with a .issuerCertificate ... },
raw: < RAW DER buffer >,
pubkey: < RAW DER buffer >,
valid_from: 'Nov 11 09:52:22 2009 GMT',
valid_to: 'Nov 6 09:52:22 2029 GMT',
fingerprint: '2A:7A:C2:DD:E5:F9:CC:53:72:35:99:7A:02:5A:71:38:5... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
2344d7bb-0564-5fee-b61d-c9c6c577c9a6 | docs | nodejs | nodejs_tls | 9x | 28 | As the `Finished` messages are message digests of the complete handshake
(with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can
be used for external authentication procedures when the authentication
provided by SSL/TLS is not desired or is not enough.
Corresponds to the `SSL_get_peer_finished` routine i... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
beabe4b2-4ce9-57f4-8128-8b10570a4c1e | docs | nodejs | nodejs_tls | 9x | 29 | ### tlsSocket.getSession()[#](#tls_tlssocket_getsession)
Added in: v0.11.4
Returns the ASN.1 encoded TLS session or `undefined` if no session was
negotiated. Can be used to speed up handshake establishment when reconnecting
to the server.
### tlsSocket.getTLSTicket()[#](#tls_tlssocket_gettlsticket)
Added in: v0.11.... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
0fa4e67e-53f6-5f20-a1c4-9962fb6876b9 | docs | nodejs | nodejs_tls | 9x | 30 | ### tlsSocket.remoteAddress[#](#tls_tlssocket_remoteaddress)
Added in: v0.11.4
Returns the string representation of the remote IP address. For example,
`'74.125.127.100'` or `'2001:4860:a005::68'`.
### tlsSocket.remoteFamily[#](#tls_tlssocket_remotefamily)
Added in: v0.11.4
Returns the string representation of the... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
475e44d7-abbf-53f5-b81b-e71f826fc908 | docs | nodejs | nodejs_tls | 9x | 31 | verification fails; `err.code` contains the OpenSSL error code. Defaults to
`true`.
+ `requestCert`
* `callback` [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) A function that will be called when the renegotiation
request has been completed.
The `tls... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
8ebf6b26-44af-5e50-8a0e-f61a9486fc86 | docs | nodejs | nodejs_tls | 9x | 32 | maximum value is `16384`.
The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size.
Returns `true` if setting the limit succeeded; `false` otherwise.
Smaller fragment sizes decrease the buffering latency on the client: larger
fragments are buffered by the TLS layer until the entire fragment is... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
d0844c5f-37ce-54ad-a620-adbde5ed2595 | docs | nodejs | nodejs_tls | 9x | 33 | object has some properties corresponding to the fields of the certificate.
Verifies the certificate `cert` is issued to host `host`.
Returns [<Error>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with the reason, host, and cert on
failure. On success,... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
fee9ecf8-5b14-5631-b328-93b172dbf07a | docs | nodejs | nodejs_tls | 9x | 34 | CN: '*.nodejs.org' },
issuer:
{ C: 'GB',
ST: 'Greater Manchester',
L: 'Salford',
O: 'COMODO CA Limited',
CN: 'COMODO RSA Domain Validation Secure Server CA' },
subjectaltname: 'DNS:*.nodejs.org, DNS:nodejs.org',
infoAccess:
{ 'CA Issuers - URI':
[ 'http://crt.comodoca.com/COMO... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
7fe2060d-c7db-5e20-bb3a-b89d89f73636 | docs | nodejs | nodejs_tls | 9x | 35 | modulus: 'B56CE45CB740B09A13F64AC543B712FF9EE8E4C284B542A1708A27E82A8D151CA178153E12E6DDA15BF70FFD96CB8A88618641BDFCCA03527E665B70D779C8A349A6F88FD4EF6557180BD4C98192872BCFE3AF56E863C09DDD8BC1EC58DF9D94F914F0369102B2870BECFA1348A0838C9C49BD1C20124B442477572347047506B1FCD658A80D0C44BCC16BC5C5496CFE6E4A8428EF654CD3D897... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
2d847999-d90e-5af7-b262-3357bb563d23 | docs | nodejs | nodejs_tls | 9x | 36 | exponent: '0x10001',
pubkey: <Buffer ... >,
valid_from: 'Aug 14 00:00:00 2017 GMT',
valid_to: 'Nov 20 23:59:59 2019 GMT',
fingerprint: '01:02:59:D9:C3:D2:0D:08:F7:82:4E:44:A4:B4:53:C5:E2:3A:87:4D',
fingerprint256: '69:AE:1A:6A:D4:3D:C6:C1:1B:EA:C6:23:DE:BA:2A:14:62:62:93:5C:7A:EA:06:41:9B:0B:BC:87:CE:48:4E:... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
c55ba7db-cc76-5ff1-a31e-d0bd104c80fe | docs | nodejs | nodejs_tls | 9x | 37 | + `host` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) Host the client should connect to, defaults to 'localhost'.
+ `port` [<number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) Port the client should connect to.
+ `path` ... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
1df1fd8a-c4f1-52e3-a5e2-65a99ac2b03d | docs | nodejs | nodejs_tls | 9x | 38 | connection/disconnection/destruction of `socket` is the user's
responsibility, calling `tls.connect()` will not cause `net.connect()` to be
called.
+ `rejectUnauthorized` [<boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) If not `false`, the server certificat... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
2e79442f-3be5-59ef-b26b-d919f09bc553 | docs | nodejs | nodejs_tls | 9x | 39 | `Uint8Array` containing supported NPN protocols. `Buffer`s should have the
format `[len][name][len][name]...` e.g. `0x05hello0x05world`, where the
first byte is the length of the next protocol name. Passing an array is
usually much simpler, e.g. `['hello', 'world']`.
+ `ALPNProtocols`: [<string[]>](ht... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
84d29fa8-e8ff-55a9-90cb-9a988880b8d8 | docs | nodejs | nodejs_tls | 9x | 40 | first byte is the length of the next protocol name. Passing an array is
usually much simpler, e.g. `['hello', 'world']`.
+ `servername`: [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) Server name for the SNI (Server Name Indication) TLS
extension.
+ `chec... | large_dataset/raw/docs/nodejs/tls/tls_9x.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.