TUN-5612: Make tls min/max version public visible
This commit is contained in:
parent
7814e870a7
commit
5f380f3a54
|
@ -19,8 +19,8 @@ type TLSParameters struct {
|
||||||
RootCAs []string
|
RootCAs []string
|
||||||
ServerName string
|
ServerName string
|
||||||
CurvePreferences []tls.CurveID
|
CurvePreferences []tls.CurveID
|
||||||
minVersion uint16 // min tls version. If zero, TLS1.0 is defined as minimum.
|
MinVersion uint16 // min tls version. If zero, TLS1.0 is defined as minimum.
|
||||||
maxVersion uint16 // max tls version. If zero, last TLS version is used defined as limit (currently TLS1.3)
|
MaxVersion uint16 // max tls version. If zero, last TLS version is used defined as limit (currently TLS1.3)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetConfig returns a TLS configuration according to the Config set by the user.
|
// GetConfig returns a TLS configuration according to the Config set by the user.
|
||||||
|
@ -74,8 +74,8 @@ func GetConfig(p *TLSParameters) (*tls.Config, error) {
|
||||||
tlsconfig.CurvePreferences = []tls.CurveID{tls.CurveP256}
|
tlsconfig.CurvePreferences = []tls.CurveID{tls.CurveP256}
|
||||||
}
|
}
|
||||||
|
|
||||||
tlsconfig.MinVersion = p.minVersion
|
tlsconfig.MinVersion = p.MinVersion
|
||||||
tlsconfig.MaxVersion = p.maxVersion
|
tlsconfig.MaxVersion = p.MaxVersion
|
||||||
|
|
||||||
return tlsconfig, nil
|
return tlsconfig, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue