GUAC-1406: Explicitly call startTLS() if STARTTLS is enabled.
This commit is contained in:
1 parent
8724ef7de7
commit
d51a719f2f
1 file changed
+7
-1
+7
-1
@@ -116,12 +116,18 @@ public class LDAPConnectionService {
|
||||
// Obtain appropriately-configured LDAPConnection instance
|
||||
LDAPConnection ldapConnection = createLDAPConnection();
|
||||
|
||||
// Connect to LDAP server
|
||||
try {
|
||||
|
||||
// Connect to LDAP server
|
||||
ldapConnection.connect(
|
||||
confService.getServerHostname(),
|
||||
confService.getServerPort()
|
||||
);
|
||||
|
||||
// Explicitly start TLS if requested
|
||||
if (confService.getEncryptionMethod() == EncryptionMethod.STARTTLS)
|
||||
ldapConnection.startTLS();
|
||||
|
||||
}
|
||||
catch (LDAPException e) {
|
||||
logger.error("Unable to connect to LDAP server: {}", e.getMessage());
|
||||
|
||||
Reference in new issue
Block a user