Skip to content
Snippets Groups Projects
Commit 685988f9 authored by ale's avatar ale
Browse files

oops, remove debug statement

parent cf59e2e0
Branches
No related tags found
No related merge requests found
......@@ -7,6 +7,11 @@ import (
"log"
)
var cipherSuites = []uint16{
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
}
// Load a CA from file (PEM encoded).
func loadCA(caFile string) *x509.CertPool {
data, err := ioutil.ReadFile(caFile)
......@@ -28,12 +33,9 @@ func TLSClientAuthConfig(caFile string) *tls.Config {
return &tls.Config{
ClientCAs: loadCA(caFile),
ClientAuth: tls.RequireAndVerifyClientCert,
CipherSuites: []uint16{
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
},
PreferServerCipherSuites: true,
MinVersion: tls.VersionTLS12,
CipherSuites: cipherSuites,
PreferServerCipherSuites: true,
}
}
......@@ -41,12 +43,8 @@ func TLSClientAuthConfig(caFile string) *tls.Config {
func TLSClientAuthConfigWithCerts(caFile, certFile, keyFile string) *tls.Config {
config := &tls.Config{
RootCAs: loadCA(caFile),
ServerName: "desktop.m.investici.org",
MinVersion: tls.VersionTLS12,
CipherSuites: []uint16{
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
},
CipherSuites: cipherSuites,
}
var err error
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment