[Pkg-privacy-commits] [xul-ext-monkeysphere] 130/296: Use the cache to track which certificate exceptions are ms-generated.

Ximin Luo infinity0 at moszumanska.debian.org
Mon Aug 24 07:39:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository xul-ext-monkeysphere.

commit ace55f451bdd4ec22a50b0acfcfbeaa6ae88125f
Author: Matthew James Goins <mjgoins at openflows.com>
Date:   Sat Mar 6 17:04:35 2010 -0500

    Use the cache to track which certificate exceptions are ms-generated.
---
 chrome/content/monkeysphere.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/chrome/content/monkeysphere.js b/chrome/content/monkeysphere.js
index 400dcf2..ca9baaa 100644
--- a/chrome/content/monkeysphere.js
+++ b/chrome/content/monkeysphere.js
@@ -215,9 +215,14 @@ var monkeysphere = {
     if(state & Components.interfaces.nsIWebProgressListener.STATE_IS_SECURE) {
       monkeysphere.log("  site state SECURE.");
       // if a monkeysphere-generated cert override is being used by this connection, then we should be setting the status from the override
-      var cert = browser.securityUI.SSLStatus.serverCert;
+      var apd = monkeysphere.createAgentPostData(browser, browser.securityUI.SSLStatus.serverCert);
+      var response = monkeysphere.cache.get(apd);
+      if ( typeof response === 'undefined' ) {
+        monkeysphere.setStatus(browser, monkeysphere.states.NEUTRAL);
+      } else {
+        monkeysphere.setStatus(browser, monkeysphere.states.VALID, response.message);
+      }
 
-      monkeysphere.setStatus(browser, monkeysphere.states.NEUTRAL);
       monkeysphere.log("done.");
       return;
 
@@ -404,6 +409,8 @@ var monkeysphere = {
 
         if (response.valid) {
 
+          monkeysphere.cache.set(client.apd, response);
+
           // VALID!
           monkeysphere.log("SITE VERIFIED!");
           monkeysphere.securityOverride(uri, cert);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/xul-ext-monkeysphere.git



More information about the Pkg-privacy-commits mailing list