Apply the trustStore setting when ssl is true - Fixes #1782 (#2449)

Previously the truststore configuration option was applied only when StartTLS is called on a plain LDAP connection, however, the trust store is equally applicable to a full TLS connection (i.e. when ldap.ssl is set to true).
This commit is contained in:
Adrian
2020-06-15 02:48:03 +10:00
committed by GitHub
parent 0e9026447d
commit cf0d8ea2d0

View File

@@ -149,7 +149,7 @@ object LDAPUtil {
keystore: String,
error: String
)(f: LDAPConnection => Either[String, A]): Either[String, A] = {
if (tls) {
if (tls || ssl) {
// Dynamically set Sun as the security provider
Security.addProvider(getSslProvider())