on 08-08-2007 8:23 AM
Hi all:
I want to connect to a LDAP use SSL, my code is like following.
Hashtable env = new Hashtable();
String ADuid = "user";
String ADpwd = "pwd";
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.SECURITY_AUTHENTICATION,"simple");
env.put(Context.SECURITY_PRINCIPAL,ADuid);
env.put(Context.SECURITY_CREDENTIALS,ADpwd);
env.put(Context.SECURITY_PROTOCOL,"ssl");
env.put(Context.PROVIDER_URL, "ldaps://server address:636");
try {
System.setProperty("javax.net.ssl.trustStore","truststore");
System.setProperty("javax.net.ssl.trustStorePassword", 123456");
// Create the initial directory context
DirContext ctx = new InitialDirContext(env);
}catch(Exception ex){
wdComponentAPI.getComponent().getMessageManager().reportException(store + ex.toString(),false);
}
These code is tested sucessful on java application. But can't work on webdynpro program, it reports an Exception "javax.naming.CommunicationException: simple bind failed Root exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found] "
I've tryed to put the truststore on different DIR, but still not work. Does the method System.setProperty available on Web server? How to implement SSL certification?
Solved myself
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Wayne Lou,
I have same issue in connecting LDAP over SSL port 636 in Web Dynpro JAVA code.
could you please share your solution code or guide me to solve my issue.
Regards,
Lakshmi Narayana Kodavati,
Hi
My code work on other Web servers, what's the different of SAP WAS?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know in VA we can add cert file in key storage, stored on TrustedCAs, but how to use the key store in Webdynpro?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.