tls13_workaround.go 279 B

12345678910111213141516
  1. // +build !confonly
  2. package tls
  3. import (
  4. "os"
  5. "strings"
  6. )
  7. func init() {
  8. // opt-in TLS 1.3 for Go1.12
  9. // TODO: remove this line when Go1.13 is released.
  10. if !strings.Contains(os.Getenv("GODEBUG"), "tls13") {
  11. _ = os.Setenv("GODEBUG", os.Getenv("GODEBUG")+",tls13=1")
  12. }
  13. }