Bug 1604773 - Restore ability to retrieve S/MIME certificates from LDAP. r=mkmelin
authorKai Engert <kaie@kuix.de>
Wed, 15 Jan 2020 10:53:03 +1300
changeset 28534 a9d1bbebb67f0407900127d2653e5d5656b0c4aa
parent 28533 7c322e55ef6b2497f57865d6d2d258a9ec185c7e
child 28535 ed741aa127edc115ccfdd103b864e77891fef371
push id16902
push usergeoff@darktrojan.net
push dateTue, 14 Jan 2020 21:55:47 +0000
treeherdercomm-central@a9d1bbebb67f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1604773
Bug 1604773 - Restore ability to retrieve S/MIME certificates from LDAP. r=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
   );