Skip to content

Commit 2750cb0

Browse files
estliberitasrvagg
authored andcommitted
doc: consistent styling for functions in TLS docs
Provide links for functions where needed and fix function links style. PR-URL: #5000 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Roman Klauke <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 3970504 commit 2750cb0

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

doc/api/tls.markdown

+24-21
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,13 @@ SNI.
295295

296296
Add secure context that will be used if client request's SNI hostname is
297297
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.
300300

301301
### server.address()
302302

303303
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
305305
more information.
306306

307307
### server.close([callback])
@@ -355,8 +355,9 @@ of written data and all required TLS negotiation.
355355
This instance implements a duplex [Stream][] interfaces. It has all the
356356
common stream methods and events.
357357

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.
360361

361362
### new tls.TLSSocket(socket[, options])
362363

@@ -367,22 +368,22 @@ Construct a new TLSSocket object from existing TCP socket.
367368
`options` is an optional object that might contain following properties:
368369

369370
- `secureContext`: An optional TLS context object from
370-
`tls.createSecureContext( ... )`
371+
[`tls.createSecureContext()`][]
371372

372373
- `isServer`: If `true` - TLS socket will be instantiated in server-mode.
373374
Default: `false`
374375

375376
- `server`: An optional [`net.Server`][] instance
376377

377-
- `requestCert`: Optional, see [tls.createSecurePair][]
378+
- `requestCert`: Optional, see [`tls.createSecurePair()`][]
378379

379-
- `rejectUnauthorized`: Optional, see [tls.createSecurePair][]
380+
- `rejectUnauthorized`: Optional, see [`tls.createSecurePair()`][]
380381

381-
- `NPNProtocols`: Optional, see [tls.createServer][]
382+
- `NPNProtocols`: Optional, see [`tls.createServer()`][]
382383

383-
- `ALPNProtocols`: Optional, see [tls.createServer][]
384+
- `ALPNProtocols`: Optional, see [`tls.createServer()`][]
384385

385-
- `SNICallback`: Optional, see [tls.createServer][]
386+
- `SNICallback`: Optional, see [`tls.createServer()`][]
386387

387388
- `session`: Optional, a `Buffer` instance, containing TLS session
388389

@@ -502,7 +503,7 @@ be used to speed up handshake establishment when reconnecting to the server.
502503
### tlsSocket.getTLSTicket()
503504

504505
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()`][].
506507

507508
Return TLS session ticket or `undefined` if none was negotiated.
508509

@@ -530,8 +531,8 @@ The numeric representation of the remote port. For example, `443`.
530531
### tlsSocket.renegotiate(options, callback)
531532

532533
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`,
535536
once the renegotiation is successfully completed.
536537

537538
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
587588
CAs will be used, like VeriSign. These are used to authorize connections.
588589

589590
- `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()`][].
591592

592593
- `rejectUnauthorized`: If `true`, the server certificate is verified against
593594
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
813814
- `ecdhCurve`: A string describing a named curve to use for ECDH key agreement
814815
or false to disable ECDH.
815816

816-
Defaults to `prime256v1` (NIST P-256). Use [crypto.getCurves()][] to obtain
817+
Defaults to `prime256v1` (NIST P-256). Use [`crypto.getCurves()`][] to obtain
817818
a list of available curve names. On recent releases,
818819
`openssl ecparam -list_curves` will also display the name and description of
819820
each available elliptic curve.
@@ -955,13 +956,13 @@ console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]
955956
[Chrome's 'modern cryptography' setting]: https://www.chromium.org/Home/chromium-security/education/tls#TOC-Deprecation-of-TLS-Features-Algorithms-in-Chrome
956957
[specific attacks affecting larger AES key sizes]: https://www.schneier.com/blog/archives/2009/07/another_new_aes.html
957958
[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
961962
[`tls.TLSSocket()`]: #tls_class_tls_tlssocket
962963
[`net.Server`]: net.html#net_class_net_server
963964
[`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
965966
[`'secureConnect'`]: #tls_event_secureconnect
966967
[`'secureConnection'`]: #tls_event_secureconnection
967968
[Perfect Forward Secrecy]: #tls_perfect_forward_secrecy
@@ -977,4 +978,6 @@ console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]
977978
[OCSP request]: https://en.wikipedia.org/wiki/OCSP_stapling
978979
[TLS recommendations]: https://wiki.mozilla.org/Security/Server_Side_TLS
979980
[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

Comments
 (0)