[VD][Workaround] Show popup when need default client cert 09/216009/2 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.005729 accepted/tizen/5.5/unified/mobile/hotfix/20201027.062759 accepted/tizen/unified/20191023.004800 submit/tizen/20191022.071114 submit/tizen_5.5/20191031.000006 submit/tizen_5.5_mobile_hotfix/20201026.185106 tizen_5.5.m2_release
authorDongHyun Song <dh81.song@samsung.com>
Fri, 18 Oct 2019 07:30:53 +0000 (16:30 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Fri, 18 Oct 2019 07:51:51 +0000 (07:51 +0000)
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 <dh81.song@samsung.com>
wrt_app/src/web_application.js

index d06e0d7..02db6ed 100755 (executable)
@@ -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) => {