mirror of https://github.com/hashicorp/consul
agent: fix tlsVersion nil check in builder
parent
09db8c7e32
commit
9f59d1bdf3
|
@ -1987,8 +1987,10 @@ func (b *builder) cidrsVal(name string, v []string) (nets []*net.IPNet) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *builder) tlsVersion(name string, v *string) types.TLSVersion {
|
func (b *builder) tlsVersion(name string, v *string) types.TLSVersion {
|
||||||
|
// TODO: should the nil check be moved into ParseTLSVersion and the arguments
|
||||||
|
// switched to take a pointer?
|
||||||
if v == nil {
|
if v == nil {
|
||||||
return nil
|
return types.TLSVersionAuto
|
||||||
}
|
}
|
||||||
|
|
||||||
a, err := tlsutil.ParseTLSVersion(*v)
|
a, err := tlsutil.ParseTLSVersion(*v)
|
||||||
|
|
Loading…
Reference in New Issue