@@ -295,13 +295,13 @@ SNI.
295
295
296
296
Add secure context that will be used if client request's SNI hostname is
297
297
matching passed ` hostname ` (wildcards can be used). ` context ` can contain
298
- ` key ` , ` cert ` , ` ca ` and/or any other properties from ` tls.createSecureContext `
299
- ` options ` argument.
298
+ ` key ` , ` cert ` , ` ca ` and/or any other properties from
299
+ [ ` tls.createSecureContext() ` ] [ ] ` options ` argument.
300
300
301
301
### server.address()
302
302
303
303
Returns the bound address, the address family name and port of the
304
- server as reported by the operating system. See [ net.Server.address()] [ ] for
304
+ server as reported by the operating system. See [ ` net.Server.address() ` ] [ ] for
305
305
more information.
306
306
307
307
### server.close([ callback] )
@@ -355,8 +355,9 @@ of written data and all required TLS negotiation.
355
355
This instance implements a duplex [ Stream] [ ] interfaces. It has all the
356
356
common stream methods and events.
357
357
358
- Methods that return TLS connection meta data (e.g. [ getPeerCertificate] [ ] will
359
- only return data while the connection is open.
358
+ Methods that return TLS connection meta data (e.g.
359
+ [ ` tls.TLSSocket.getPeerCertificate() ` ] [ ] will only return data while the
360
+ connection is open.
360
361
361
362
### new tls.TLSSocket(socket[ , options] )
362
363
@@ -367,22 +368,22 @@ Construct a new TLSSocket object from existing TCP socket.
367
368
` options ` is an optional object that might contain following properties:
368
369
369
370
- ` secureContext ` : An optional TLS context object from
370
- ` tls.createSecureContext( ... ) `
371
+ [ ` tls.createSecureContext() ` ] [ ]
371
372
372
373
- ` isServer ` : If ` true ` - TLS socket will be instantiated in server-mode.
373
374
Default: ` false `
374
375
375
376
- ` server ` : An optional [ ` net.Server ` ] [ ] instance
376
377
377
- - ` requestCert ` : Optional, see [ tls.createSecurePair] [ ]
378
+ - ` requestCert ` : Optional, see [ ` tls.createSecurePair() ` ] [ ]
378
379
379
- - ` rejectUnauthorized ` : Optional, see [ tls.createSecurePair] [ ]
380
+ - ` rejectUnauthorized ` : Optional, see [ ` tls.createSecurePair() ` ] [ ]
380
381
381
- - ` NPNProtocols ` : Optional, see [ tls.createServer] [ ]
382
+ - ` NPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
382
383
383
- - ` ALPNProtocols ` : Optional, see [ tls.createServer] [ ]
384
+ - ` ALPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
384
385
385
- - ` SNICallback ` : Optional, see [ tls.createServer] [ ]
386
+ - ` SNICallback ` : Optional, see [ ` tls.createServer() ` ] [ ]
386
387
387
388
- ` session ` : Optional, a ` Buffer ` instance, containing TLS session
388
389
@@ -502,7 +503,7 @@ be used to speed up handshake establishment when reconnecting to the server.
502
503
### tlsSocket.getTLSTicket()
503
504
504
505
NOTE: Works only with client TLS sockets. Useful only for debugging, for
505
- session reuse provide ` session ` option to ` tls.connect ` .
506
+ session reuse provide ` session ` option to [ ` tls.connect() ` ] [ ] .
506
507
507
508
Return TLS session ticket or ` undefined ` if none was negotiated.
508
509
@@ -530,8 +531,8 @@ The numeric representation of the remote port. For example, `443`.
530
531
### tlsSocket.renegotiate(options, callback)
531
532
532
533
Initiate TLS renegotiation process. The ` options ` may contain the following
533
- fields: ` rejectUnauthorized ` , ` requestCert ` (See [ tls.createServer] [ ]
534
- for details). ` callback(err) ` will be executed with ` null ` as ` err ` ,
534
+ fields: ` rejectUnauthorized ` , ` requestCert ` (See [ ` tls.createServer() ` ] [ ] for
535
+ details). ` callback(err) ` will be executed with ` null ` as ` err ` ,
535
536
once the renegotiation is successfully completed.
536
537
537
538
NOTE: Can be used to request peer's certificate after the secure connection
@@ -587,7 +588,7 @@ Creates a new client connection to the given `port` and `host` (old API) or
587
588
CAs will be used, like VeriSign. These are used to authorize connections.
588
589
589
590
- ` ciphers ` : A string describing the ciphers to use or exclude, separated by
590
- ` : ` . Uses the same default cipher suite as ` tls.createServer ` .
591
+ ` : ` . Uses the same default cipher suite as [ ` tls.createServer() ` ] [ ] .
591
592
592
593
- ` rejectUnauthorized ` : If ` true ` , the server certificate is verified against
593
594
the list of supplied CAs. An ` 'error' ` event is emitted if verification
@@ -813,7 +814,7 @@ automatically set as a listener for the [`'secureConnection'`][] event. The
813
814
- ` ecdhCurve` : A string describing a named curve to use for ECDH key agreement
814
815
or false to disable ECDH .
815
816
816
- Defaults to ` prime256v1` (NIST P - 256 ). Use [crypto .getCurves ()][] to obtain
817
+ Defaults to ` prime256v1` (NIST P - 256 ). Use [` crypto.getCurves()` ][] to obtain
817
818
a list of available curve names . On recent releases,
818
819
` openssl ecparam -list_curves` will also display the name and description of
819
820
each available elliptic curve.
@@ -955,13 +956,13 @@ console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]
955
956
[ Chrome's 'modern cryptography' setting ] : https://www.chromium.org/Home/chromium-security/education/tls#TOC-Deprecation-of-TLS-Features-Algorithms-in-Chrome
956
957
[ specific attacks affecting larger AES key sizes ] : https://www.schneier.com/blog/archives/2009/07/another_new_aes.html
957
958
[ BEAST attacks ] : https://blog.ivanristic.com/2011/10/mitigating-the-beast-attack-on-tls.html
958
- [ crypto.getCurves() ] : crypto.html#crypto_crypto_getcurves
959
- [ tls.createServer ] : #tls_tls_createserver_options_secureconnectionlistener
960
- [ tls.createSecurePair ] : #tls_tls_createsecurepair_context_isserver_requestcert_rejectunauthorized_options
959
+ [ ` crypto.getCurves()` ] : crypto.html#crypto_crypto_getcurves
960
+ [ ` tls.createServer()` ] : #tls_tls_createserver_options_secureconnectionlistener
961
+ [ ` tls.createSecurePair()` ] : #tls_tls_createsecurepair_context_isserver_requestcert_rejectunauthorized_options
961
962
[ `tls.TLSSocket()` ] : #tls_class_tls_tlssocket
962
963
[ `net.Server` ] : net.html#net_class_net_server
963
964
[ `net.Socket` ] : net.html#net_class_net_socket
964
- [ net.Server.address() ] : net.html#net_server_address
965
+ [ ` net.Server.address()` ] : net.html#net_server_address
965
966
[ `'secureConnect'` ] : #tls_event_secureconnect
966
967
[ `'secureConnection'` ] : #tls_event_secureconnection
967
968
[ Perfect Forward Secrecy ] : #tls_perfect_forward_secrecy
@@ -977,4 +978,6 @@ console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]
977
978
[ OCSP request ] : https://en.wikipedia.org/wiki/OCSP_stapling
978
979
[ TLS recommendations ] : https://wiki.mozilla.org/Security/Server_Side_TLS
979
980
[ TLS Session Tickets ] : https://www.ietf.org/rfc/rfc5077.txt
980
- [ getPeerCertificate ] : #tls_tlssocket_getpeercertificate_detailed
981
+ [ `tls.TLSSocket.getPeerCertificate()` ] : #tls_tlssocket_getpeercertificate_detailed
982
+ [ `tls.createSecureContext()` ] : #tls_tls_createsecurecontext_details
983
+ [ `tls.connect()` ] : #tls_tls_connect_options_callback
0 commit comments