Go for the safer and faster curves for HTTPS.

This commit is contained in:
Azareal 2018-07-26 16:15:49 +10:00
parent 3b0b2485d7
commit 2e77ef716d
1 changed files with 9 additions and 0 deletions

View File

@ -8,6 +8,7 @@ package main
import ( import (
"bytes" "bytes"
"crypto/tls"
"flag" "flag"
"fmt" "fmt"
"io" "io"
@ -493,6 +494,14 @@ func main() {
ReadTimeout: 5 * time.Second, ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second, WriteTimeout: 10 * time.Second,
IdleTimeout: 120 * time.Second, IdleTimeout: 120 * time.Second,
TLSConfig: &tls.Config{
PreferServerCipherSuites: true,
CurvePreferences: []tls.CurveID{
tls.CurveP256,
tls.X25519,
},
},
} }
} }