Skip to content

Commit

Permalink
Add support for TLS 1.3 in Go 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrestein committed Apr 3, 2019
1 parent f38642d commit c534cbc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ import (
"crypto/tls"
"crypto/x509"
"encoding/base64"
"os"
)

func init() {
os.Setenv("GODEBUG", os.Getenv("GODEBUG")+",tls13=1")
}

// GetConfigForClient implements the Config.GetClientCertificate callback
func (a *Armor) GetConfigForClient(clientHelloInfo *tls.ClientHelloInfo) (*tls.Config, error) {
// Get the host from the hello info
Expand Down

0 comments on commit c534cbc

Please sign in to comment.