Skip to content

Commit 0fa2f39

Browse files
Hannes-Magnusson-CKgibfahn
authored andcommitted
doc: improve checkServerIdentity docs
PR-URL: #17203 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent afd4d9e commit 0fa2f39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/api/tls.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,9 @@ added: v0.11.3
808808
* `servername`: {string} Server name for the SNI (Server Name Indication) TLS
809809
extension.
810810
* `checkServerIdentity(servername, cert)` {Function} A callback function
811-
to be used when checking the server's hostname against the certificate.
812-
This should throw an error if verification fails. The method should return
811+
   to be used (instead of the builtin `tls.checkServerIdentity()` function)
812+
when checking the server's hostname against the certificate.
813+
This should return an {Error} if verification fails. The method should return
813814
`undefined` if the `servername` and `cert` are verified.
814815
* `session` {Buffer} A `Buffer` instance, containing TLS session.
815816
* `minDHSize` {number} Minimum size of the DH parameter in bits to accept a

0 commit comments

Comments
 (0)