This commit is contained in:
@@ -22,7 +22,8 @@ type LdapConfig struct {
|
||||
}
|
||||
|
||||
var systemCA *x509.CertPool
|
||||
var certLoaded bool
|
||||
var CertLoaded bool
|
||||
var LdapEnabled bool
|
||||
|
||||
func GetFilePath(path string) string {
|
||||
// Check for empty filename
|
||||
@@ -80,7 +81,7 @@ func LoadLdapCert() {
|
||||
// Add custom certificate to the system cert pool
|
||||
systemCA.AddCert(crt)
|
||||
|
||||
certLoaded = true
|
||||
CertLoaded = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +92,8 @@ func VerifyLdapCreds(username string, password string) bool {
|
||||
if ldapServer == "" {
|
||||
log.Printf("VerifyLdapCreds no LDAP bind address supplied\n")
|
||||
return false
|
||||
} else {
|
||||
LdapEnabled = true
|
||||
}
|
||||
|
||||
ldapBaseDn := os.Getenv("LDAP_BASE_DN")
|
||||
|
Reference in New Issue
Block a user