mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 12:26:34 +02:00
fix consul tls settings (#3719)
This commit is contained in:
parent
ccf10f64c0
commit
f46e6ca5ed
@ -26,6 +26,7 @@ import (
|
||||
"github.com/hashicorp/errwrap"
|
||||
multierror "github.com/hashicorp/go-multierror"
|
||||
"github.com/hashicorp/vault/helper/consts"
|
||||
"github.com/hashicorp/vault/helper/parseutil"
|
||||
"github.com/hashicorp/vault/helper/strutil"
|
||||
"github.com/hashicorp/vault/helper/tlsutil"
|
||||
"github.com/hashicorp/vault/physical"
|
||||
@ -113,7 +114,7 @@ func NewConsulBackend(conf map[string]string, logger log.Logger) (physical.Backe
|
||||
disableReg, ok := conf["disable_registration"]
|
||||
var disableRegistration bool
|
||||
if ok && disableReg != "" {
|
||||
b, err := strconv.ParseBool(disableReg)
|
||||
b, err := parseutil.ParseBool(disableReg)
|
||||
if err != nil {
|
||||
return nil, errwrap.Wrapf("failed parsing disable_registration parameter: {{err}}", err)
|
||||
}
|
||||
@ -251,8 +252,14 @@ func setupTLSConfig(conf map[string]string) (*tls.Config, error) {
|
||||
}
|
||||
|
||||
insecureSkipVerify := false
|
||||
if _, ok := conf["tls_skip_verify"]; ok {
|
||||
insecureSkipVerify = true
|
||||
tlsSkipVerify, ok := conf["tls_skip_verify"]
|
||||
|
||||
if ok && tlsSkipVerify != "" {
|
||||
b, err := parseutil.ParseBool(tlsSkipVerify)
|
||||
if err != nil {
|
||||
return nil, errwrap.Wrapf("failed parsing tls_skip_verify parameter: {{err}}", err)
|
||||
}
|
||||
insecureSkipVerify = b
|
||||
}
|
||||
|
||||
tlsMinVersionStr, ok := conf["tls_min_version"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user