Bug 1471959 - leave values undefined if value is none, r? rpl draft
authorShane Caraveo <scaraveo@mozilla.com>
Mon, 02 Jul 2018 16:48:51 -0300
changeset 813239 9dcc9b8c0a9e
parent 813238 6a922b14cacb
push id114834
push usermixedpuppy@gmail.com
push dateMon, 02 Jul 2018 19:49:35 +0000
bugs1471959
milestone63.0a1
Bug 1471959 - leave values undefined if value is none, r? rpl MozReview-Commit-ID: F6410J8p70Q
toolkit/components/extensions/schemas/web_request.json
toolkit/modules/addons/SecurityInfo.jsm
--- a/toolkit/components/extensions/schemas/web_request.json
+++ b/toolkit/components/extensions/schemas/web_request.json
@@ -264,16 +264,26 @@
             ],
             "optional": true
           },
           "cipherSuite": {
             "type": "string",
             "description": "The cipher suite used in this request if state is \"secure\".",
             "optional": true
           },
+          "keaGroupName": {
+            "type": "string",
+            "description": "The key exchange algorithm used in this request if state is \"secure\".",
+            "optional": true
+          },
+          "signatureSchemeName": {
+            "type": "string",
+            "description": "The signature scheme used in this request if state is \"secure\".",
+            "optional": true
+          },
           "certificates": {
             "description": "Certificate data if state is \"secure\".  Will only contain one entry unless <code>certificateChain</code> is passed as an option.",
             "type": "array",
             "items": { "$ref": "CertificateInfo" }
           },
           "isDomainMismatch": {
             "description": "The domain name does not match the certificate domain.",
             "type": "boolean",
--- a/toolkit/modules/addons/SecurityInfo.jsm
+++ b/toolkit/modules/addons/SecurityInfo.jsm
@@ -132,20 +132,24 @@ const SecurityInfo = {
       // No known STATE_IS_* flags.
       return info;
     }
 
     // Cipher suite.
     info.cipherSuite = SSLStatus.cipherName;
 
     // Key exchange group name.
-    info.keaGroupName = SSLStatus.keaGroupName;
+    if (SSLStatus.keaGroupName !== "none") {
+      info.keaGroupName = SSLStatus.keaGroupName;
+    }
 
     // Certificate signature scheme.
-    info.signatureSchemeName = SSLStatus.signatureSchemeName;
+    if (SSLStatus.signatureSchemeName !== "none") {
+      info.signatureSchemeName = SSLStatus.signatureSchemeName;
+    }
 
     info.isDomainMismatch = SSLStatus.isDomainMismatch;
     info.isExtendedValidation = SSLStatus.isExtendedValidation;
     info.isNotValidAtThisTime = SSLStatus.isNotValidAtThisTime;
     info.isUntrusted = SSLStatus.isUntrusted;
 
     info.certificateTransparencyStatus = this.getTransparencyStatus(SSLStatus.certificateTransparencyStatus);