Hi, OpenLDAP developers,
I have been able to successfully write a simple C program using the OpenLDAP C-SDK to establish connection to Microsoft Active Directory Server over SSL.
In my test program, I call ldap_set_option( NULL, LDAP_OPT_X_TLS_CACERTDIR, cert_path) to set the path to a directory where all my CA Root certificates are.
OpenLDAP uses OpenSSL format of certificate management, the trusted CA Root Certificates are no longer imported into a single file (aka the certificate store). OpenSSL hashes the certificate file (.pem format), and uses symbolic link to link to the actual certificate.pem file.
Here's content of my cert_path dir:
wud2@pleoski:[/emc/wud2/ldap_certdb]> ls -altr total 80 -rw-r--r-- 1 wud2 dctmuser 1688 Sep 16 09:36 ldap112_rootca.pem drwxr-xr-x 2 wud2 dctmuser 1024 Sep 16 09:37 ./ lrwxrwxrwx 1 wud2 dctmuser 18 Sep 16 10:11 e8332e5a.0 -> ldap112_rootca.pem drwxr-xr-x 67 wud2 dctmuser 9216 Oct 14 14:04 ../
I am trying to write a Java LDAP client program using Novell's JLDAP to connect to Microsoft Active Directory server, over SSL. I would like to use my current cert_path (listed above) to establish LDAP SSL connection, in Java.
I found an example listed on the Novell site: http://developer.novell.com/documentation/samplecode/jldap_sample/security/S...
// Dynamically set JSSE as a security provider
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
// Dynamically set the property that JSSE uses to identify
// the keystore that holds trusted root certificates
System.setProperty("javax.net.ssl.trustStore", path);
As you can see, in this Java example, the "path" value is expected to be "keystore file that holds trusted root certificates".
But in my case, I only have a directory where trusted root certificates are present. I don't exactly have a single keystore file.
So, my questions is, what is the Java equivalent for ldap_set_option( NULL, LDAP_OPT_X_TLS_CACERTDIR, cert_path)?
Any comments/input would be much appreciated.
Thanks.
Daisy
On Tue, Oct 18, 2011 at 07:28:17PM -0400, daisy.wu@emc.com wrote:
I am trying to write a Java LDAP client program using Novell's JLDAP to connect to Microsoft Active Directory server, over SSL. I would like to use my current cert_path (listed above) to establish LDAP SSL connection, in Java.
You'll need to learn about Java keystores and the 'keytool' utility:
http://download.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.htm...
And there are a bunch of write-ups about how to use the OpenSSL tools to convert to/from the two key storage technolgies.
Not pretty; good luck...
Any comments/input would be much appreciated.
Thanks.
Daisy
Probably not much to the point, but I thought I should send this info (derived from earlier posts in this list).
For Java apps one could also use: http://www.unboundid.com/products/ldapsdk/ for Java or (now Oracle's) JNDI.
Nick
On 19/10/2011 2:28 πμ, daisy.wu@emc.com wrote:
I am trying to write a Java LDAP client program using Novell’s JLDAP
Nick Milas wrote:
Probably not much to the point, but I thought I should send this info (derived from earlier posts in this list).
Which Java LDAP SDK you use is irrelevant. The point is that Java has its own TLS certificate/key management system and it doesn't use PEM files.
For Java apps one could also use: http://www.unboundid.com/products/ldapsdk/ for Java or (now Oracle's) JNDI.
Nick
On 19/10/2011 2:28 πμ, daisy.wu@emc.com wrote:
I am trying to write a Java LDAP client program using Novell’s JLDAP
Hi,
For Java apps, one might also want to consider Apache Directory API http://directory.apache.org/api/ or OpenDJ LDAP API and Toolkit http://opendj.forgerock.org/opendj-ldap-sdk/.
Kind regards,
Ludovic. Ludovic Poitou ForgeRock - Product Manager for OpenDJ, open source LDAP directory services in Java. http://www.forgerock.com/ http://ludopoitou.wordpress.com/
On Oct 19, 2011, at 10:36 , Nick Milas wrote:
Probably not much to the point, but I thought I should send this info (derived from earlier posts in this list).
For Java apps one could also use: http://www.unboundid.com/products/ldapsdk/ for Java or (now Oracle's) JNDI.
Nick
On 19/10/2011 2:28 πμ, daisy.wu@emc.com wrote:
I am trying to write a Java LDAP client program using Novell’s JLDAP
openldap-technical@openldap.org