agent: fix tlsVersion nil check in builder

pull/11647/head
Mike Morris 2021-11-23 15:49:36 -05:00
parent 09db8c7e32
commit 9f59d1bdf3
1 changed files with 3 additions and 1 deletions

View File

@ -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 {
// TODO: should the nil check be moved into ParseTLSVersion and the arguments
// switched to take a pointer?
if v == nil {
return nil
return types.TLSVersionAuto
}
a, err := tlsutil.ParseTLSVersion(*v)