Bug 1604773 - Restore ability to retrieve S/MIME certificates from LDAP. r+a=mkmelin
authorKai Engert <kaie@kuix.de>
Wed, 15 Jan 2020 10:53:03 +1300
changeset 36079 2c52c943f7d3d234ae4ec35356f387b5daa557cd
parent 36078 67b45a3d3df9b7d13f00dab4f7b4ce5473c24675
child 36080 fa98c3cb44b95a2ffa1b56a3bed2328bbcee22aa
push id77
push usergeoff@darktrojan.net
push dateWed, 22 Jan 2020 22:22:48 +0000
treeherdercomm-esr68@72e751b740f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1604773
Bug 1604773 - Restore ability to retrieve S/MIME certificates from LDAP. r+a=mkmelin
mailnews/extensions/smime/content/certFetchingStatus.js
--- a/mailnews/extensions/smime/content/certFetchingStatus.js
+++ b/mailnews/extensions/smime/content/certFetchingStatus.js
@@ -80,21 +80,20 @@ function stopFetching() {
   }
 }
 
 function importCert(ber_value) {
   if (!gCertDB) {
     gCertDB = Cc[nsX509CertDB].getService(nsIX509CertDB);
   }
 
-  var cert_length = {};
-  var cert_bytes = ber_value.get(cert_length);
-
+  // ber_value has type nsILDAPBERValue
+  var cert_bytes = ber_value.get();
   if (cert_bytes) {
-    gCertDB.importEmailCertificate(cert_bytes, cert_length.value, null);
+    gCertDB.importEmailCertificate(cert_bytes, cert_bytes.length, null);
   }
 }
 
 function getLDAPOperation() {
   gLdapOperation = Cc["@mozilla.org/network/ldap-operation;1"].createInstance(
     Ci.nsILDAPOperation
   );