Use object for verification request

This commit is contained in:
Kevin Sawicki 2017-02-07 16:35:37 -08:00
parent 5245d42d15
commit 70178adb6e
7 changed files with 52 additions and 18 deletions

View file

@ -250,9 +250,10 @@ the original network configuration.
#### `ses.setCertificateVerifyProc(proc)`
* `proc` Function
* `hostname` String
* `certificate` [Certificate](structures/certificate.md)
* `error` String - Verification result from chromium.
* `request` Object
* `hostname` String
* `certificate` [Certificate](structures/certificate.md)
* `error` String - Verification result from chromium.
* `callback` Function
* `verificationResult` Integer - Value can be one of certificate error codes
from [here](https://code.google.com/p/chromium/codesearch#chromium/src/net/base/net_error_list.h).
@ -262,9 +263,9 @@ the original network configuration.
* `-3` - Uses the verification result from chromium.
Sets the certificate verify proc for `session`, the `proc` will be called with
`proc(hostname, certificate, callback)` whenever a server certificate
verification is requested. Calling `callback(true)` accepts the certificate,
calling `callback(false)` rejects it.
`proc(request, callback)` whenever a server certificate
verification is requested. Calling `callback(0)` accepts the certificate,
calling `callback(-2)` rejects it.
Calling `setCertificateVerifyProc(null)` will revert back to default certificate
verify proc.