Hi,
I have a question concerning secure LDAP and Java.
When I try to do
System.setProperty("javax.net.ssl.trustStore",/usr/local/j2sdk1.4.2_08/jre/lib/security/jssecacerts");
System.setProperty("javax.net.ssl.trustPassword", "secret");
System.setProperty("javax.net.debug", "SSL");
DirContext ctx = new InitialDirContext(ldapEnv);
I get the following error
javax.naming.CommunicationException: SASL bind failed: host.domain.at:636
[Root exception is javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found]
My question is:
I have three "certificates" in my ldap configuration directory
1) cacert.pem: containing the certificate authority
2) servercrt.pem: containing the public key
3) serverkey.pem: containing the private and the public key
When I issue a
keytool -import -file /home/didi/projects/xlabadmin/build/servercrt.pem\
-keystore jssecacerts
which file do I have to import: 1), 2) or 3). I tried with 1) but still
get the error above.
Any help would be highly appreciated.
Thanks in advance
Dieter
Jan Peter Stotz - 18 Dec 2005 19:52 GMT
Dieter Schicker schrieb:
> I have three "certificates" in my ldap configuration directory
>
> 1) cacert.pem: containing the certificate authority
> 2) servercrt.pem: containing the public key
> 3) serverkey.pem: containing the private and the public key
> which file do I have to import: 1), 2) or 3). I tried with 1) but still
> get the error above.
You need to import 1) into your truststore and 3) into your keystore.
Jan
Dieter Schicker - 19 Dec 2005 05:03 GMT
Thanks for your answer! No I ran into another problem:
(Sorry, I'm really not good in SSL)
When I try to import the serverkey.pem, I get the error:
Input not an X.509 certificate.
The same error occurs when I try to import servercrt.pem.
The certs where created with openssl.
Any ideas?
Thanks
Dieter
> Dieter Schicker schrieb:
>
[quoted text clipped - 10 lines]
>
> Jan