|
@@ -577,7 +577,7 @@ describe('session module', () => {
|
|
|
it('rejects the request when the callback is called with -2', async () => {
|
|
|
const ses = session.fromPartition(`${Math.random()}`);
|
|
|
let validate: () => void;
|
|
|
- ses.setCertificateVerifyProc(({ hostname, certificate, verificationResult }, callback) => {
|
|
|
+ ses.setCertificateVerifyProc(({ hostname, certificate, verificationResult, isIssuedByKnownRoot }, callback) => {
|
|
|
validate = () => {
|
|
|
expect(hostname).to.equal('127.0.0.1');
|
|
|
expect(certificate.issuerName).to.equal('Intermediate CA');
|
|
@@ -590,6 +590,7 @@ describe('session module', () => {
|
|
|
expect(certificate.issuerCert.issuerCert.subject.commonName).to.equal('Root CA');
|
|
|
expect(certificate.issuerCert.issuerCert.issuerCert).to.equal(undefined);
|
|
|
expect(verificationResult).to.be.oneOf(['net::ERR_CERT_AUTHORITY_INVALID', 'net::ERR_CERT_COMMON_NAME_INVALID']);
|
|
|
+ expect(isIssuedByKnownRoot).to.be.false();
|
|
|
};
|
|
|
callback(-2);
|
|
|
});
|