doc: improve checkServerIdentity docs

PR-URL: https://github.com/nodejs/node/pull/17203
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Hannes Magnusson 2017-11-21 13:36:08 -08:00 committed by Anna Henningsen
parent 56e8ee1103
commit da429c3d20
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -792,8 +792,9 @@ changes:
* `servername`: {string} Server name for the SNI (Server Name Indication) TLS * `servername`: {string} Server name for the SNI (Server Name Indication) TLS
extension. extension.
* `checkServerIdentity(servername, cert)` {Function} A callback function * `checkServerIdentity(servername, cert)` {Function} A callback function
to be used when checking the server's hostname against the certificate.    to be used (instead of the builtin `tls.checkServerIdentity()` function)
This should throw an error if verification fails. The method should return 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. `undefined` if the `servername` and `cert` are verified.
* `session` {Buffer} A `Buffer` instance, containing TLS session. * `session` {Buffer} A `Buffer` instance, containing TLS session.
* `minDHSize` {number} Minimum size of the DH parameter in bits to accept a * `minDHSize` {number} Minimum size of the DH parameter in bits to accept a