mirror of
https://github.com/minio/minio.git
synced 2025-04-15 00:35:31 -04:00
http: opt-in to TLS 1.3 (#7483)
This commit enables TLS 1.3 on the server. For Go 1.12 TLS 1.3 is enabled by an explicit opt-in.
This commit is contained in:
parent
a74cb93666
commit
012e4b42f9
@ -20,6 +20,7 @@ import (
|
|||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
@ -31,6 +32,13 @@ import (
|
|||||||
"github.com/minio/minio/pkg/certs"
|
"github.com/minio/minio/pkg/certs"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// Opt-in to TLS 1.3. See: https://golang.org/pkg/crypto/tls
|
||||||
|
// In future Go versions TLS 1.3 probably gets enabled by default.
|
||||||
|
// So, we can remove this line as soon as this is the case.
|
||||||
|
os.Setenv("GODEBUG", os.Getenv("GODEBUG")+",tls13=1")
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
serverShutdownPoll = 500 * time.Millisecond
|
serverShutdownPoll = 500 * time.Millisecond
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user