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 36994 7e2733b1e871d5bcdd4e850889a44a865ff5a92c
parent 36993 560911f4360eb9798dfd75f9138037c4b2373757
child 36995 6a6d427d1bd3089991f202b850a1e4481c233ee9
push id2545
push usergeoff@darktrojan.net
push dateWed, 15 Jan 2020 21:10:47 +0000
treeherdercomm-beta@d7e99ea4d5ce [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
   );