Remove RSA/Verisign name hack from Page Info r=Ratty
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 21 Jun 2013 12:24:40 +0100
changeset 12621 b60aa307fa480246d1dc7502ced283f5418dd45f
parent 12620 d24d0ef7532cbfadf0279891502fb55a95eb3f95
child 12622 08a888eb7a776400f3904909a6526fb554024d50
push id9267
push userneil@parkwaycc.co.uk
push dateFri, 21 Jun 2013 11:24:50 +0000
treeherdercomm-central@b60aa307fa48 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersRatty
Remove RSA/Verisign name hack from Page Info r=Ratty a=Callek for checkin to a CLOSED TREE
suite/browser/pageinfo/security.js
--- a/suite/browser/pageinfo/security.js
+++ b/suite/browser/pageinfo/security.js
@@ -37,18 +37,17 @@ var security = {
       (ui.state & nsIWebProgressListener.STATE_IS_INSECURE);
     var isEV = ui &&
       (ui.state & nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL);
     var status = ui ? ui.QueryInterface(nsISSLStatusProvider).SSLStatus : null;
 
     if (!isInsecure && status) {
       status.QueryInterface(nsISSLStatus);
       var cert = status.serverCert;
-      var issuerName =
-        this.mapIssuerOrganization(cert.issuerOrganization) || cert.issuerName;
+      var issuerName = cert.issuerOrganization || cert.issuerName;
 
       var retval = {
         hostName : hName,
         cAName : issuerName,
         encryptionAlgorithm : undefined,
         encryptionStrength : undefined,
         isBroken : isBroken,
         isEV : isEV,
@@ -80,28 +79,16 @@ var security = {
 
   // Find the secureBrowserUI object (if present)
   _getSecurityUI : function() {
     if ("gBrowser" in window.opener)
       return window.opener.gBrowser.securityUI;
     return null;
   },
 
-  // Interface for mapping a certificate issuer organization to
-  // the value to be displayed.
-  // Bug 82017 - this implementation should be moved to pipnss C++ code
-  mapIssuerOrganization: function(name) {
-    if (!name) return null;
-
-    if (name == "RSA Data Security, Inc.") return "Verisign, Inc.";
-
-    // No mapping required
-    return name;
-  },
-  
   /**
    * Open the cookie manager window
    */
   viewCookies : function()
   {
     var hostName = "";
     try {
       hostName = gDocument.documentURIObject.asciiHost;
@@ -135,32 +122,30 @@ function securityOnLoad() {
 
   var owner, verifier, generalPageIdentityString, identityClass;
   if (info.cert && !info.isBroken) {
     // Try to pull out meaningful values.  Technically these fields are optional
     // so we'll employ fallbacks where appropriate.  The EV spec states that Org
     // fields must be specified for subject and issuer so that case is simpler.
     if (info.isEV) {
       owner = info.cert.organization;
-      verifier = security.mapIssuerOrganization(info.cAName);
+      verifier = info.cAName;
       generalPageIdentityString =
         pageInfoBundle.getFormattedString("generalSiteIdentity",
                                           [owner, verifier]);
       identityClass = "verifiedIdentity";
     }
     else {
       // Technically, a non-EV cert might specify an owner in the O field or not,
       // depending on the CA's issuing policies.  However we don't have any programmatic
       // way to tell those apart, and no policy way to establish which organization
       // vetting standards are good enough (that's what EV is for) so we default to
       // treating these certs as domain-validated only.
       owner = pageInfoBundle.getString("securityNoOwner");
-      verifier = security.mapIssuerOrganization(info.cAName ||
-                                                info.cert.issuerCommonName ||
-                                                info.cert.issuerName);
+      verifier = info.cAName || info.cert.issuerCommonName || info.cert.issuerName;
       generalPageIdentityString = owner;
       identityClass = "verifiedDomain";
     }
   }
   else {
     // We don't have valid identity credentials.
     owner = pageInfoBundle.getString("securityNoOwner");
     verifier = pageInfoBundle.getString("notSet");