This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* First create the keystore (to allow SSL protection) by importing the LDAP | |
* certificate (cert.pem) with: | |
* keytool -import -keystore keystore -storepass changeit -noprompt -file cert.pem | |
* | |
* You can get the certificate with OpenSSL: | |
* openssl s_client -connect ldap.server.com:636 </dev/null 2>/dev/null | sed -n '/^-----BEGIN/,/^-----END/ { p }' > cert.pem | |
* | |
* Then compile this class with: | |
* javac LdapAuth.java |