[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
SSHA/MD5 Password Encryption
I 've set my slapd.conf to
password-hash {MD5}
I've java code which looks something like this:
// Set up the environment for creating the initial context
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=JNDITutorial");
// Authenticate as C. User and password "mysecret"
env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5");
env.put(Context.SECURITY_PRINCIPAL, "dn:cn=C. User, ou=NewHires,
o=JNDITutorial");
env.put(Context.SECURITY_CREDENTIALS, "mysecret");
// Create the initial context
DirContext ctx = new InitialDirContext(env);
// ... do something useful with ctx
Still, it does not support MD5 encryption and throws
AuthenticationNotSupported exception.
please help me .. How do I configure ldap server to support MD5/SSHA
encryption?
tanx