Use object for verification request
This commit is contained in:
parent
5245d42d15
commit
70178adb6e
7 changed files with 52 additions and 18 deletions
|
@ -22,9 +22,9 @@ Session.prototype._init = function () {
|
|||
}
|
||||
|
||||
Session.prototype.setCertificateVerifyProc = function (verifyProc) {
|
||||
if (verifyProc != null && verifyProc.length <= 3) {
|
||||
if (verifyProc != null && verifyProc.length > 2) {
|
||||
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
||||
this._setCertificateVerifyProc((hostname, certificate, error, cb) => {
|
||||
this._setCertificateVerifyProc(({hostname, certificate, verificationResult}, cb) => {
|
||||
verifyProc(hostname, certificate, (result) => {
|
||||
cb(result ? 0 : -2)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue