mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-29 06:31:10 +01:00
parent
61a4f4a6a2
commit
aa6a5fa25b
@ -243,6 +243,7 @@ func (c *ConfigEntry) DialLDAP() (*ldap.Conn, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var conn *ldap.Conn
|
var conn *ldap.Conn
|
||||||
|
var tlsConfig *tls.Config
|
||||||
switch u.Scheme {
|
switch u.Scheme {
|
||||||
case "ldap":
|
case "ldap":
|
||||||
if port == "" {
|
if port == "" {
|
||||||
@ -250,7 +251,7 @@ func (c *ConfigEntry) DialLDAP() (*ldap.Conn, error) {
|
|||||||
}
|
}
|
||||||
conn, err = ldap.Dial("tcp", host+":"+port)
|
conn, err = ldap.Dial("tcp", host+":"+port)
|
||||||
if c.StartTLS {
|
if c.StartTLS {
|
||||||
tlsConfig, err := c.GetTLSConfig(host)
|
tlsConfig, err = c.GetTLSConfig(host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -260,7 +261,7 @@ func (c *ConfigEntry) DialLDAP() (*ldap.Conn, error) {
|
|||||||
if port == "" {
|
if port == "" {
|
||||||
port = "636"
|
port = "636"
|
||||||
}
|
}
|
||||||
tlsConfig, err := c.GetTLSConfig(host)
|
tlsConfig, err = c.GetTLSConfig(host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user