Skip to content

Commit

Permalink
doc: standardize on "host name" in tls.md
Browse files Browse the repository at this point in the history
Our docs have a mix of "hostname" and "host name" in prose.

Let's follow the usage of Unix man pages, RFCs, and most
professionally-edited sources, and use "host name" in prose and
"hostname" to refer to the command and in code.

Lint rule forthcoming.

PR-URL: #31326
Refs: #31073
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
Trott authored and codebytere committed Mar 17, 2020
1 parent 54b5346 commit 5f45eaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/tls.md
Expand Up @@ -545,7 +545,7 @@ called:
added: v0.5.3
-->

* `hostname` {string} A SNI hostname or wildcard (e.g. `'*'`)
* `hostname` {string} A SNI host name or wildcard (e.g. `'*'`)
* `context` {Object} An object containing any of the possible properties
from the [`tls.createSecureContext()`][] `options` arguments (e.g. `key`,
`cert`, `ca`, etc).
Expand Down Expand Up @@ -1308,7 +1308,7 @@ changes:
with optional identity `hint` provided by the server or `null`
in case of TLS 1.3 where `hint` was removed.
It will be necessary to provide a custom `tls.checkServerIdentity()`
for the connection as the default one will try to check hostname/IP
for the connection as the default one will try to check host name/IP
of the server against the certificate but that's not applicable for PSK
because there won't be a certificate present.
More information can be found in the [RFC 4279][].
Expand All @@ -1328,7 +1328,7 @@ changes:
`SNICallback` option to [`tls.createServer()`][].
* `checkServerIdentity(servername, cert)` {Function} A callback function
to be used (instead of the builtin `tls.checkServerIdentity()` function)
when checking the server's hostname (or the provided `servername` when
when checking the server's host name (or the provided `servername` when
explicitly set) against the certificate. This should return an {Error} if
verification fails. The method should return `undefined` if the `servername`
and `cert` are verified.
Expand Down

0 comments on commit 5f45eaf

Please sign in to comment.