diff options
Diffstat (limited to 'modules/auth/ldap/ldap.go')
-rw-r--r-- | modules/auth/ldap/ldap.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go index 361ca5817f..116feecc8b 100644 --- a/modules/auth/ldap/ldap.go +++ b/modules/auth/ldap/ldap.go @@ -21,8 +21,8 @@ type SecurityProtocol int // Note: new type must be added at the end of list to maintain compatibility. const ( SecurityProtocolUnencrypted SecurityProtocol = iota - SecurityProtocolLdaps - SecurityProtocolStartTls + SecurityProtocolLDAPS + SecurityProtocolStartTLS ) // Basic LDAP authentication service @@ -118,7 +118,7 @@ func dial(ls *Source) (*ldap.Conn, error) { ServerName: ls.Host, InsecureSkipVerify: ls.SkipVerify, } - if ls.SecurityProtocol == SecurityProtocolLdaps { + if ls.SecurityProtocol == SecurityProtocolLDAPS { return ldap.DialTLS("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port), tlsCfg) } @@ -127,7 +127,7 @@ func dial(ls *Source) (*ldap.Conn, error) { return nil, fmt.Errorf("Dial: %v", err) } - if ls.SecurityProtocol == SecurityProtocolStartTls { + if ls.SecurityProtocol == SecurityProtocolStartTLS { if err = conn.StartTLS(tlsCfg); err != nil { conn.Close() return nil, fmt.Errorf("StartTLS: %v", err) |