From 15a4b955dfc475a5918a2db0ab3859e17f1f99ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Magn=C3=BAsson?= <32143325+Hannes-Magnusson-CK@users.noreply.github.com> Date: Tue, 21 Nov 2017 13:36:08 -0800 Subject: [PATCH] doc: Improve checkServerIdentity docs --- doc/api/tls.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index 334efeb86fbce7..f9ef4798ef6c82 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -792,8 +792,9 @@ changes: * `servername`: {string} Server name for the SNI (Server Name Indication) TLS extension. * `checkServerIdentity(servername, cert)` {Function} A callback function - to be used when checking the server's hostname against the certificate. - This should throw an error if verification fails. The method should return +    to be used (instead of the builtin `tls.checkServerIdentity()` function) + when checking the server's hostname against the certificate. + This should return an {Error} if verification fails. The method should return `undefined` if the `servername` and `cert` are verified. * `session` {Buffer} A `Buffer` instance, containing TLS session. * `minDHSize` {number} Minimum size of the DH parameter in bits to accept a