Bug 1278281 - add SSL functionnality to ldap query in autoconf. r=mkaply
authorkarel-de-macil@wanadoo.fr
Tue, 07 Jun 2016 18:10:46 +0200
changeset 344013 47e94b41aba1fb020f580cbec7d1e0089eb19dc0
parent 344012 8c9ee38712de90211e792e0861002835532c3f54
child 344014 eecb6828cdb643dd4581e302e50d299861d98d79
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkaply
bugs1278281
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1278281 - add SSL functionnality to ldap query in autoconf. r=mkaply
extensions/pref/autoconfig/src/prefcalls.js
--- a/extensions/pref/autoconfig/src/prefcalls.js
+++ b/extensions/pref/autoconfig/src/prefcalls.js
@@ -147,20 +147,20 @@ function clearPref(prefName) {
         
 }
 
 function setLDAPVersion(version) {
     gVersion = version;
 }
 
 
-function getLDAPAttributes(host, base, filter, attribs) {
+function getLDAPAttributes(host, base, filter, attribs, isSecure) {
     
     try {
-        var urlSpec = "ldap://" + host + "/" + base + "?" + attribs + "?sub?" +
+        var urlSpec = "ldap" + (isSecure ? "s" : "") + "://" + host + (isSecure ? ":636" : "") + "/" + base + "?" + attribs + "?sub?" +
                       filter;
 
         var url = Components.classes["@mozilla.org/network/io-service;1"]
                             .getService(Components.interfaces.nsIIOService)
                             .newURI(urlSpec, null, null)
                             .QueryInterface(Components.interfaces.nsILDAPURL);
 
         var ldapquery = Components.classes[LDAPSyncQueryContractID]