Check if CertsDir is not empty
Signed-off-by: Michal Gebauer <mishak@mishak.net>
This commit is contained in:
parent
7efcb7496c
commit
73a209107e
2 changed files with 3 additions and 1 deletions
|
@ -62,7 +62,7 @@ func newTLSConfig(hostname string, isSecure bool) (*tls.Config, error) {
|
|||
|
||||
tlsConfig.InsecureSkipVerify = !isSecure
|
||||
|
||||
if isSecure {
|
||||
if isSecure && CertsDir != "" {
|
||||
hostDir := filepath.Join(CertsDir, cleanPath(hostname))
|
||||
logrus.Debugf("hostDir: %s", hostDir)
|
||||
if err := ReadCertsDirectory(&tlsConfig, hostDir); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue