mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-16 13:17:19 +02:00
all: explicit TLS MinVersion in tls.Config
Go's default is already TLS 1.2+ (since Go 1.18), but making this explicit satisfies RFC 7858/9250 recommendations and makes the security intent clear for auditors.
This commit is contained in:
committed by
Cuong Manh Le
parent
d629ecda33
commit
33682e2312
@@ -11,7 +11,8 @@ func TestCACertPool(t *testing.T) {
|
||||
c := &http.Client{
|
||||
Transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
RootCAs: CACertPool(),
|
||||
RootCAs: CACertPool(),
|
||||
MinVersion: tls.VersionTLS12,
|
||||
},
|
||||
},
|
||||
Timeout: 2 * time.Second,
|
||||
|
||||
@@ -293,7 +293,7 @@ func apiTransport(cdDev bool) *http.Transport {
|
||||
return dial(ctx, "tcp6", addrsFromPort(apiIpsV6, port))
|
||||
}
|
||||
if router.Name() == ddwrt.Name || runtime.GOOS == "android" {
|
||||
transport.TLSClientConfig = &tls.Config{RootCAs: certs.CACertPool()}
|
||||
transport.TLSClientConfig = &tls.Config{RootCAs: certs.CACertPool(), MinVersion: tls.VersionTLS12}
|
||||
}
|
||||
return transport
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user