@@ -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,20 +368,20 @@ 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
- - ` SNICallback ` : Optional, see [ tls.createServer] [ ]
384
+ - ` SNICallback ` : Optional, see [ ` tls.createServer() ` ] [ ]
384
385
385
386
- ` session ` : Optional, a ` Buffer ` instance, containing TLS session
386
387
@@ -485,7 +486,7 @@ be used to speed up handshake establishment when reconnecting to the server.
485
486
### tlsSocket.getTLSTicket()
486
487
487
488
NOTE: Works only with client TLS sockets. Useful only for debugging, for
488
- session reuse provide ` session ` option to ` tls.connect ` .
489
+ session reuse provide ` session ` option to [ ` tls.connect() ` ] [ ] .
489
490
490
491
Return TLS session ticket or ` undefined ` if none was negotiated.
491
492
@@ -513,8 +514,8 @@ The numeric representation of the remote port. For example, `443`.
513
514
### tlsSocket.renegotiate(options, callback)
514
515
515
516
Initiate TLS renegotiation process. The ` options ` may contain the following
516
- fields: ` rejectUnauthorized ` , ` requestCert ` (See [ tls.createServer] [ ]
517
- for details). ` callback(err) ` will be executed with ` null ` as ` err ` ,
517
+ fields: ` rejectUnauthorized ` , ` requestCert ` (See [ ` tls.createServer() ` ] [ ] for
518
+ details). ` callback(err) ` will be executed with ` null ` as ` err ` ,
518
519
once the renegotiation is successfully completed.
519
520
520
521
NOTE: Can be used to request peer's certificate after the secure connection
@@ -569,7 +570,7 @@ Creates a new client connection to the given `port` and `host` (old API) or
569
570
CAs will be used, like VeriSign. These are used to authorize connections.
570
571
571
572
- ` ciphers ` : A string describing the ciphers to use or exclude, separated by
572
- ` : ` . Uses the same default cipher suite as ` tls.createServer ` .
573
+ ` : ` . Uses the same default cipher suite as [ ` tls.createServer() ` ] [ ] .
573
574
574
575
- ` rejectUnauthorized ` : If ` true ` , the server certificate is verified against
575
576
the list of supplied CAs. An ` 'error' ` event is emitted if verification
@@ -779,7 +780,7 @@ automatically set as a listener for the [`'secureConnection'`][] event. The
779
780
- ` ecdhCurve` : A string describing a named curve to use for ECDH key agreement
780
781
or false to disable ECDH .
781
782
782
- Defaults to ` prime256v1` (NIST P - 256 ). Use [crypto .getCurves ()][] to obtain
783
+ Defaults to ` prime256v1` (NIST P - 256 ). Use [` crypto.getCurves()` ][] to obtain
783
784
a list of available curve names . On recent releases,
784
785
` openssl ecparam -list_curves` will also display the name and description of
785
786
each available elliptic curve.
@@ -914,13 +915,13 @@ console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]
914
915
[ Chrome's 'modern cryptography' setting ] : https://www.chromium.org/Home/chromium-security/education/tls#TOC-Deprecation-of-TLS-Features-Algorithms-in-Chrome
915
916
[ specific attacks affecting larger AES key sizes ] : https://www.schneier.com/blog/archives/2009/07/another_new_aes.html
916
917
[ BEAST attacks ] : https://blog.ivanristic.com/2011/10/mitigating-the-beast-attack-on-tls.html
917
- [ crypto.getCurves() ] : crypto.html#crypto_crypto_getcurves
918
- [ tls.createServer ] : #tls_tls_createserver_options_secureconnectionlistener
919
- [ tls.createSecurePair ] : #tls_tls_createsecurepair_context_isserver_requestcert_rejectunauthorized_options
918
+ [ ` crypto.getCurves()` ] : crypto.html#crypto_crypto_getcurves
919
+ [ ` tls.createServer()` ] : #tls_tls_createserver_options_secureconnectionlistener
920
+ [ ` tls.createSecurePair()` ] : #tls_tls_createsecurepair_context_isserver_requestcert_rejectunauthorized_options
920
921
[ `tls.TLSSocket()` ] : #tls_class_tls_tlssocket
921
922
[ `net.Server` ] : net.html#net_class_net_server
922
923
[ `net.Socket` ] : net.html#net_class_net_socket
923
- [ net.Server.address() ] : net.html#net_server_address
924
+ [ ` net.Server.address()` ] : net.html#net_server_address
924
925
[ `'secureConnect'` ] : #tls_event_secureconnect
925
926
[ `'secureConnection'` ] : #tls_event_secureconnection
926
927
[ Stream ] : stream.html#stream_stream
@@ -935,4 +936,6 @@ console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]
935
936
[ OCSP request ] : https://en.wikipedia.org/wiki/OCSP_stapling
936
937
[ TLS recommendations ] : https://wiki.mozilla.org/Security/Server_Side_TLS
937
938
[ TLS Session Tickets ] : https://www.ietf.org/rfc/rfc5077.txt
938
- [ getPeerCertificate ] : #tls_tlssocket_getpeercertificate_detailed
939
+ [ `tls.TLSSocket.getPeerCertificate()` ] : #tls_tlssocket_getpeercertificate_detailed
940
+ [ `tls.createSecureContext()` ] : #tls_tls_createsecurecontext_details
941
+ [ `tls.connect()` ] : #tls_tls_connect_options_callback
0 commit comments