Commit a9660125 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Fixed SSL connections (JM-303).


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/branches@1494 b35dd754-fafc-0310-a699-88a17e54d16e
parent 741d916b
...@@ -267,8 +267,11 @@ public class LdapManager { ...@@ -267,8 +267,11 @@ public class LdapManager {
env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, userDN + "," + baseDN); env.put(Context.SECURITY_PRINCIPAL, userDN + "," + baseDN);
env.put(Context.SECURITY_CREDENTIALS, password); env.put(Context.SECURITY_CREDENTIALS, password);
// Specify timeout to be 10 seconds // Specify timeout to be 10 seconds, only on non SSL since SSL connections
env.put("com.sun.jndi.ldap.connect.timeout", "10000"); // break with a teimout.
if (!sslEnabled) {
env.put("com.sun.jndi.ldap.connect.timeout", "10000");
}
if (ldapDebugEnabled) { if (ldapDebugEnabled) {
env.put("com.sun.jndi.ldap.trace.ber", System.err); env.put("com.sun.jndi.ldap.trace.ber", System.err);
} }
...@@ -298,8 +301,11 @@ public class LdapManager { ...@@ -298,8 +301,11 @@ public class LdapManager {
env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, userDN + "," + alternateBaseDN); env.put(Context.SECURITY_PRINCIPAL, userDN + "," + alternateBaseDN);
env.put(Context.SECURITY_CREDENTIALS, password); env.put(Context.SECURITY_CREDENTIALS, password);
// Specify timeout to be 10 seconds // Specify timeout to be 10 seconds, only on non SSL since SSL connections
env.put("com.sun.jndi.ldap.connect.timeout", "10000"); // break with a teimout.
if (!sslEnabled) {
env.put("com.sun.jndi.ldap.connect.timeout", "10000");
}
if (ldapDebugEnabled) { if (ldapDebugEnabled) {
env.put("com.sun.jndi.ldap.trace.ber", System.err); env.put("com.sun.jndi.ldap.trace.ber", System.err);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment