mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUAC-1406: Explicitly call startTLS() if STARTTLS is enabled.
This commit is contained in:
@@ -116,12 +116,18 @@ public class LDAPConnectionService {
|
|||||||
// Obtain appropriately-configured LDAPConnection instance
|
// Obtain appropriately-configured LDAPConnection instance
|
||||||
LDAPConnection ldapConnection = createLDAPConnection();
|
LDAPConnection ldapConnection = createLDAPConnection();
|
||||||
|
|
||||||
// Connect to LDAP server
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
// Connect to LDAP server
|
||||||
ldapConnection.connect(
|
ldapConnection.connect(
|
||||||
confService.getServerHostname(),
|
confService.getServerHostname(),
|
||||||
confService.getServerPort()
|
confService.getServerPort()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Explicitly start TLS if requested
|
||||||
|
if (confService.getEncryptionMethod() == EncryptionMethod.STARTTLS)
|
||||||
|
ldapConnection.startTLS();
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (LDAPException e) {
|
catch (LDAPException e) {
|
||||||
logger.error("Unable to connect to LDAP server: {}", e.getMessage());
|
logger.error("Unable to connect to LDAP server: {}", e.getMessage());
|
||||||
|
Reference in New Issue
Block a user