mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUACAMOLE-938: Use STARTTLS for "ldap://..." URLs if main LDAP connection uses STARTTLS.
This commit is contained in:
@@ -195,6 +195,15 @@ public class LDAPConnectionService {
|
|||||||
if (LdapUrl.LDAPS_SCHEME.equals(ldapUrl.getScheme()))
|
if (LdapUrl.LDAPS_SCHEME.equals(ldapUrl.getScheme()))
|
||||||
encryptionMethod = EncryptionMethod.SSL;
|
encryptionMethod = EncryptionMethod.SSL;
|
||||||
|
|
||||||
|
// Use STARTTLS for otherwise unencrypted ldap:// URLs if the main
|
||||||
|
// LDAP connection requires STARTTLS
|
||||||
|
else if (confService.getEncryptionMethod() == EncryptionMethod.STARTTLS) {
|
||||||
|
logger.debug("Using STARTTLS for LDAP URL \"{}\" as the main LDAP "
|
||||||
|
+ "connection described in guacamole.properties is "
|
||||||
|
+ "configured to use STARTTLS.", url);
|
||||||
|
encryptionMethod = EncryptionMethod.STARTTLS;
|
||||||
|
}
|
||||||
|
|
||||||
// If no post is specified within the URL, use the default port
|
// If no post is specified within the URL, use the default port
|
||||||
// dictated by the encryption method
|
// dictated by the encryption method
|
||||||
int port = ldapUrl.getPort();
|
int port = ldapUrl.getPort();
|
||||||
|
Reference in New Issue
Block a user