make ldap cert check configurable, fix CodeQL warnings

This commit is contained in:
Christoph Haas
2021-03-22 22:52:08 +01:00
parent 588f8c7c70
commit 6ece6e5be9
3 changed files with 9 additions and 8 deletions

View File

@@ -182,7 +182,7 @@ func (provider Provider) open() (*ldap.Conn, error) {
if provider.config.StartTLS {
// Reconnect with TLS
err = conn.StartTLS(&tls.Config{InsecureSkipVerify: true})
err = conn.StartTLS(&tls.Config{InsecureSkipVerify: !provider.config.CertValidation})
if err != nil {
return nil, err
}