From 9823d7776177fdd1d3295b6999bf2bfe759c2878 Mon Sep 17 00:00:00 2001 From: Salah Benmoussati <51402489+sbenmoussati@users.noreply.github.com> Date: Thu, 5 May 2022 12:16:41 +0200 Subject: [PATCH] SDA-3140 Certificates validation bugfix (#1400) --- src/app/window-handler.ts | 8 +++----- src/app/window-utils.ts | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index bbfcfd75..4ed61525 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -668,11 +668,9 @@ export class WindowHandler { }); // Certificate verification proxy - if (!isDevEnv) { - this.mainWebContents.session.setCertificateVerifyProc( - handleCertificateProxyVerification, - ); - } + this.mainWebContents.session.setCertificateVerifyProc( + handleCertificateProxyVerification, + ); app.on('browser-window-focus', () => { this.registerGlobalShortcuts(); diff --git a/src/app/window-utils.ts b/src/app/window-utils.ts index 7f99d1a1..a0d60bfe 100644 --- a/src/app/window-utils.ts +++ b/src/app/window-utils.ts @@ -689,8 +689,8 @@ export const handleCertificateProxyVerification = ( ) { return callback(0); } - - return callback(-2); + // We let chromium handle the verification result. In case chromium detects a certificate error, then 'certificate-error' event will be triggered. + return callback(-3); }; /**