From: DongHyun Song Date: Fri, 18 Oct 2019 07:30:53 +0000 (+0900) Subject: [VD][Workaround] Show popup when need default client cert X-Git-Tag: accepted/tizen/5.5/unified/20191031.005729^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2ffe802b48f3465572d60ba3b6337409d758ea8;p=platform%2Fframework%2Fweb%2Fwrtjs.git [VD][Workaround] Show popup when need default client cert This is for detecting apps, which need TV default client cert. TV default client certification will be expired soon, but we cannot know which apps use this default client cert. So that checking these apps by SQA verification, adds popup window. This patch will be reverted after QA verification Change-Id: I8bafbbb2150234a43745d1f95a640726ee44eb26 Signed-off-by: DongHyun Song --- diff --git a/wrt_app/src/web_application.js b/wrt_app/src/web_application.js index d06e0d7..02db6ed 100755 --- a/wrt_app/src/web_application.js +++ b/wrt_app/src/web_application.js @@ -126,6 +126,22 @@ class WebApplication { self.pendingCallbacks.set(id, callback); wrt.handleAuthRequest(id, webContents); }); + if (this.isTVProfile) { + // TODO. This logic in only for QA verification + // Current TV default client cert will be expired. + // So that detecting apps which use TV client certificate, + // adds popup alarms for QA + app.on('select-client-certificate', function(event, webContents, host, list, callback) { + console.log('select-client-certificate'); + event.preventDefault(); + if (list.length > 0 && list[0].subjectName == 'Samsung TV,BDP certificate') { + setTimeout(() => { + wrt.showDialog(webContents, 'Samsung TV,BDP certificate'); + }, 7000); + } + callback(list[0]); + }); + } if (this.accessiblePath) { console.log('accessiblePath : ' + this.accessiblePath); protocol.interceptFileProtocol('file', (request, callback) => {