remove ses.setCertificateVerifyProc() deprecation

This commit is contained in:
Shelley Vohr 2018-05-23 09:47:14 -07:00
parent 22fed0c798
commit fb4a8e9cb9
No known key found for this signature in database
GPG key ID: F13993A75599653C
2 changed files with 8 additions and 43 deletions

View file

@ -22,16 +22,5 @@ Session.prototype._init = function () {
}
Session.prototype.setCertificateVerifyProc = function (verifyProc) {
if (verifyProc != null && verifyProc.length > 2) {
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
this._setCertificateVerifyProc(({hostname, certificate, verificationResult}, cb) => {
verifyProc(hostname, certificate, (result) => {
// Disabled due to false positive in StandardJS
// eslint-disable-next-line standard/no-callback-literal
cb(result ? 0 : -2)
})
})
} else {
this._setCertificateVerifyProc(verifyProc)
}
this._setCertificateVerifyProc(verifyProc)
}