diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java index 7f1d718a43..c641a2409b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java @@ -21,17 +21,6 @@ class PromptService2 { XPCOMObject promptService2; int refCount = 0; - static final String[] certErrorCodes = new String[] { - "ssl_error_bad_cert_domain", - "sec_error_ca_cert_invalid", - "sec_error_expired_certificate", - "sec_error_expired_issuer_certificate", - "sec_error_inadequate_key_usage", - "sec_error_unknown_issuer", - "sec_error_untrusted_cert", - "sec_error_untrusted_issuer", - }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ - PromptService2 () { createCOMInterfaces (); } @@ -173,22 +162,12 @@ int Alert (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText) String textLabel = new String (dest); /* - * If mozilla is showing its errors with dialogs (as opposed to pages) then the only - * opportunity to detect that a page has an invalid certificate, without receiving - * all notification callbacks on the channel, is to detect the displaying of an alert - * whose message contains an internal cert error code. If a such a message is - * detected then instead of showing it, re-navigate to the page with the invalid - * certificate so that the browser's nsIBadCertListener2 will be invoked. + * If mozilla is re-navigating to a page with a bad certificate in order + * to get its certificate info then do not show cert error message alerts. */ if (browser != null) { - for (int i = 0; i < certErrorCodes.length; i++) { - if (textLabel.indexOf (certErrorCodes[i]) != -1) { - Mozilla mozilla = (Mozilla)browser.webBrowser; - mozilla.isRetrievingBadCert = true; - browser.setUrl (mozilla.lastNavigateURL); - return XPCOM.NS_OK; - } - } + Mozilla mozilla = (Mozilla)browser.webBrowser; + if (mozilla.isRetrievingBadCert) return XPCOM.NS_OK; } Shell shell = browser == null ? new Shell () : browser.getShell (); |