mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Use object for verification request
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user