2016-11-03 21:13:18 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"crypto/tls"
|
2018-06-26 08:02:26 +01:00
|
|
|
"crypto/x509"
|
2016-11-03 21:13:18 +00:00
|
|
|
"encoding/hex"
|
2018-08-19 20:59:43 +01:00
|
|
|
"errors"
|
2018-02-16 20:07:05 +00:00
|
|
|
"flag"
|
2016-11-03 21:13:18 +00:00
|
|
|
"fmt"
|
2018-08-19 20:59:43 +01:00
|
|
|
"io/ioutil"
|
2016-11-03 21:13:18 +00:00
|
|
|
"log"
|
|
|
|
"net/http"
|
|
|
|
"os"
|
2018-08-19 20:59:43 +01:00
|
|
|
"strings"
|
2016-11-30 20:09:43 +00:00
|
|
|
"time"
|
2016-11-03 21:13:18 +00:00
|
|
|
)
|
|
|
|
|
2018-02-16 20:07:05 +00:00
|
|
|
type ZeroRTT_t int
|
|
|
|
type PubKeyAlgo_t int
|
|
|
|
|
|
|
|
// Bitset
|
|
|
|
const (
|
2018-06-26 08:02:26 +01:00
|
|
|
ZeroRTT_None ZeroRTT_t = 0
|
|
|
|
ZeroRTT_Offer = 1 << 0
|
|
|
|
ZeroRTT_Accept = 1 << 1
|
2018-02-16 20:07:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type server struct {
|
2018-08-15 16:24:51 +01:00
|
|
|
Address string
|
|
|
|
ZeroRTT ZeroRTT_t
|
|
|
|
TLS tls.Config
|
2018-02-16 20:07:05 +00:00
|
|
|
}
|
|
|
|
|
2016-11-03 21:13:18 +00:00
|
|
|
var tlsVersionToName = map[uint16]string{
|
2018-09-16 08:36:45 +01:00
|
|
|
tls.VersionTLS10: "1.0",
|
|
|
|
tls.VersionTLS11: "1.1",
|
|
|
|
tls.VersionTLS12: "1.2",
|
|
|
|
tls.VersionTLS13: "1.3",
|
2016-11-03 21:13:18 +00:00
|
|
|
}
|
|
|
|
|
2018-02-16 20:07:05 +00:00
|
|
|
func NewServer() *server {
|
2018-06-26 08:02:26 +01:00
|
|
|
s := new(server)
|
|
|
|
s.ZeroRTT = ZeroRTT_None
|
2018-08-15 16:24:51 +01:00
|
|
|
s.Address = "0.0.0.0:443"
|
|
|
|
s.TLS = tls.Config{
|
|
|
|
GetConfigForClient: func(*tls.ClientHelloInfo) (*tls.Config, error) {
|
|
|
|
// If we send the first flight too fast, NSS sends empty early data.
|
|
|
|
time.Sleep(500 * time.Millisecond)
|
|
|
|
return nil, nil
|
|
|
|
},
|
|
|
|
MaxVersion: tls.VersionTLS13,
|
|
|
|
ClientAuth: tls.NoClientCert,
|
|
|
|
}
|
|
|
|
|
2018-06-26 08:02:26 +01:00
|
|
|
return s
|
2018-02-16 20:07:05 +00:00
|
|
|
}
|
|
|
|
|
2018-10-05 22:43:00 +01:00
|
|
|
func enableQR(s *server, enableDefault bool) {
|
|
|
|
var sidhCurves = []tls.CurveID{tls.HybridSidhP503Curve25519}
|
|
|
|
if enableDefault {
|
|
|
|
var defaultCurvePreferences = []tls.CurveID{tls.X25519, tls.CurveP256, tls.CurveP384, tls.CurveP521}
|
|
|
|
s.TLS.CurvePreferences = append(s.TLS.CurvePreferences, defaultCurvePreferences...)
|
|
|
|
}
|
|
|
|
s.TLS.CurvePreferences = append(s.TLS.CurvePreferences, sidhCurves...)
|
|
|
|
}
|
|
|
|
|
2018-02-16 20:07:05 +00:00
|
|
|
func (s *server) start() {
|
2018-08-19 20:59:43 +01:00
|
|
|
var err error
|
2018-06-26 08:02:26 +01:00
|
|
|
if (s.ZeroRTT & ZeroRTT_Offer) == ZeroRTT_Offer {
|
2018-08-15 16:24:51 +01:00
|
|
|
s.TLS.Max0RTTDataSize = 100 * 1024
|
2016-11-25 21:46:50 +00:00
|
|
|
}
|
2018-08-15 16:24:51 +01:00
|
|
|
|
2017-09-18 16:50:43 +01:00
|
|
|
if keyLogFile := os.Getenv("SSLKEYLOGFILE"); keyLogFile != "" {
|
2018-08-15 16:24:51 +01:00
|
|
|
s.TLS.KeyLogWriter, err = os.OpenFile(keyLogFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600)
|
2017-09-18 16:50:43 +01:00
|
|
|
if err != nil {
|
|
|
|
log.Fatalf("Cannot open keylog file: %v", err)
|
|
|
|
}
|
|
|
|
log.Println("Enabled keylog")
|
|
|
|
}
|
2018-02-16 20:07:05 +00:00
|
|
|
|
2018-08-15 16:24:51 +01:00
|
|
|
s.TLS.ClientCAs = x509.NewCertPool()
|
|
|
|
s.TLS.ClientCAs.AppendCertsFromPEM([]byte(rsaCa_client))
|
|
|
|
s.TLS.Accept0RTTData = ((s.ZeroRTT & ZeroRTT_Accept) == ZeroRTT_Accept)
|
2018-09-16 15:36:10 +01:00
|
|
|
s.TLS.NextProtos = []string{"npn_proto"}
|
2018-02-16 21:07:31 +00:00
|
|
|
|
2018-02-16 20:07:05 +00:00
|
|
|
httpServer := &http.Server{
|
2018-08-15 16:24:51 +01:00
|
|
|
Addr: s.Address,
|
|
|
|
TLSConfig: &s.TLS,
|
2016-11-25 21:46:50 +00:00
|
|
|
}
|
2018-02-16 20:07:05 +00:00
|
|
|
log.Fatal(httpServer.ListenAndServeTLS("", ""))
|
2016-11-25 21:46:50 +00:00
|
|
|
}
|
|
|
|
|
2018-08-19 20:59:43 +01:00
|
|
|
// setServerCertificateFromArgs sets server certificate from an argument provided by the caller. Possible values
|
|
|
|
// for arg_cert:
|
|
|
|
// * "rsa": sets hardcoded RSA keypair
|
|
|
|
// * "ecdsa": sets hardcoded ECDSA keypair
|
|
|
|
// * FILE1:FILE2: Uses private key from FILE1 and public key from FILE2. Both must be in PEM format. FILE2 can
|
|
|
|
// be single certificate or certificate chain.
|
|
|
|
// * nil: fallbacks to "rsa"
|
|
|
|
//
|
|
|
|
// Function generate a panic in case certificate can't be correctly set
|
|
|
|
func (s *server) setServerCertificateFromArgs(arg_cert *string) {
|
|
|
|
var certStr, keyStr []byte
|
|
|
|
var cert tls.Certificate
|
|
|
|
var err error
|
|
|
|
|
|
|
|
if arg_cert == nil {
|
|
|
|
// set rsa by default
|
|
|
|
certStr, keyStr = []byte(rsaCert), []byte(rsaKey)
|
|
|
|
} else {
|
|
|
|
switch *arg_cert {
|
|
|
|
case "rsa":
|
|
|
|
certStr, keyStr = []byte(rsaCert), []byte(rsaKey)
|
|
|
|
case "ecdsa":
|
|
|
|
certStr, keyStr = []byte(ecdsaCert), []byte(ecdsaKey)
|
|
|
|
default:
|
|
|
|
files := strings.Split(*arg_cert, ":")
|
|
|
|
if len(files) != 2 {
|
|
|
|
err = errors.New("Wrong format provided after -cert.")
|
|
|
|
goto err
|
|
|
|
}
|
|
|
|
keyStr, err = ioutil.ReadFile(files[0])
|
|
|
|
if err != nil {
|
|
|
|
goto err
|
|
|
|
}
|
|
|
|
certStr, err = ioutil.ReadFile(files[1])
|
|
|
|
if err != nil {
|
|
|
|
goto err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cert, err = tls.X509KeyPair(certStr, keyStr)
|
|
|
|
if err != nil {
|
|
|
|
goto err
|
|
|
|
}
|
|
|
|
|
|
|
|
s.TLS.Certificates = []tls.Certificate{cert}
|
|
|
|
err:
|
|
|
|
if err != nil {
|
|
|
|
// Not possible to proceed really
|
|
|
|
log.Fatal(err)
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-03 21:13:18 +00:00
|
|
|
func main() {
|
2018-02-16 20:07:05 +00:00
|
|
|
|
2018-06-26 08:02:26 +01:00
|
|
|
s := NewServer()
|
2018-02-16 20:07:05 +00:00
|
|
|
|
2018-06-26 08:02:26 +01:00
|
|
|
arg_addr := flag.String("b", "0.0.0.0:443", "Address:port used for binding")
|
2018-08-19 20:59:43 +01:00
|
|
|
arg_cert := flag.String("cert", "rsa", "Public algorithm to use:\nOptions [rsa, ecdsa, PrivateKeyFile:CertificateChainFile]")
|
2018-06-26 08:02:26 +01:00
|
|
|
arg_zerortt := flag.String("rtt0", "n", `0-RTT, accepts following values [n: None, a: Accept, o: Offer, oa: Offer and Accept]`)
|
|
|
|
arg_confirm := flag.Bool("rtt0ack", false, "0-RTT confirm")
|
|
|
|
arg_clientauth := flag.Bool("cliauth", false, "Performs client authentication (RequireAndVerifyClientCert used)")
|
2018-10-05 22:43:00 +01:00
|
|
|
arg_qr := flag.String("qr", "", "Enable quantum-resistant algorithms [c: Support classical and Quantum-Resistant, q: Enable Quantum-Resistant only]")
|
2018-06-26 08:02:26 +01:00
|
|
|
flag.Parse()
|
2018-02-16 20:07:05 +00:00
|
|
|
|
2018-06-26 08:02:26 +01:00
|
|
|
s.Address = *arg_addr
|
2018-02-16 20:07:05 +00:00
|
|
|
|
2018-08-19 20:59:43 +01:00
|
|
|
s.setServerCertificateFromArgs(arg_cert)
|
2018-02-16 20:07:05 +00:00
|
|
|
|
2018-06-26 08:02:26 +01:00
|
|
|
if *arg_zerortt == "a" {
|
|
|
|
s.ZeroRTT = ZeroRTT_Accept
|
|
|
|
} else if *arg_zerortt == "o" {
|
|
|
|
s.ZeroRTT = ZeroRTT_Offer
|
|
|
|
} else if *arg_zerortt == "oa" {
|
|
|
|
s.ZeroRTT = ZeroRTT_Offer | ZeroRTT_Accept
|
|
|
|
}
|
2018-02-16 20:07:05 +00:00
|
|
|
|
2018-06-26 08:02:26 +01:00
|
|
|
if *arg_clientauth {
|
2018-08-15 16:24:51 +01:00
|
|
|
s.TLS.ClientAuth = tls.RequireAndVerifyClientCert
|
2018-06-26 08:02:26 +01:00
|
|
|
}
|
2018-02-16 21:07:31 +00:00
|
|
|
|
2018-10-05 22:43:00 +01:00
|
|
|
if *arg_qr == "c" {
|
|
|
|
enableQR(s, true)
|
|
|
|
} else if *arg_qr == "q" {
|
|
|
|
enableQR(s, false)
|
|
|
|
}
|
|
|
|
|
2016-11-03 21:13:18 +00:00
|
|
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
2016-11-25 21:46:50 +00:00
|
|
|
tlsConn := r.Context().Value(http.TLSConnContextKey).(*tls.Conn)
|
2016-12-05 22:11:46 +00:00
|
|
|
|
|
|
|
with0RTT := ""
|
|
|
|
if !tlsConn.ConnectionState().HandshakeConfirmed {
|
|
|
|
with0RTT = " [0-RTT]"
|
|
|
|
}
|
2018-02-16 20:07:05 +00:00
|
|
|
if *arg_confirm || r.URL.Path == "/confirm" {
|
2016-11-25 21:46:50 +00:00
|
|
|
if err := tlsConn.ConfirmHandshake(); err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
2016-12-05 22:11:46 +00:00
|
|
|
if with0RTT != "" {
|
|
|
|
with0RTT = " [0-RTT confirmed]"
|
|
|
|
}
|
|
|
|
if !tlsConn.ConnectionState().HandshakeConfirmed {
|
|
|
|
panic("HandshakeConfirmed false after ConfirmHandshake")
|
|
|
|
}
|
2016-11-25 21:46:50 +00:00
|
|
|
}
|
2016-12-05 22:11:46 +00:00
|
|
|
|
2016-11-21 22:25:27 +00:00
|
|
|
resumed := ""
|
|
|
|
if r.TLS.DidResume {
|
|
|
|
resumed = " [resumed]"
|
|
|
|
}
|
2016-12-05 22:11:46 +00:00
|
|
|
|
|
|
|
http2 := ""
|
|
|
|
if r.ProtoMajor == 2 {
|
|
|
|
http2 = " [HTTP/2]"
|
2016-11-25 21:46:50 +00:00
|
|
|
}
|
2016-12-05 22:11:46 +00:00
|
|
|
|
|
|
|
fmt.Fprintf(w, "<!DOCTYPE html><p>Hello TLS %s%s%s%s _o/\n", tlsVersionToName[r.TLS.Version], resumed, with0RTT, http2)
|
2016-11-03 21:13:18 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
http.HandleFunc("/ch", func(w http.ResponseWriter, r *http.Request) {
|
2017-04-09 17:32:53 +01:00
|
|
|
w.Header().Set("Content-Type", "text/plain")
|
2016-11-03 21:13:18 +00:00
|
|
|
fmt.Fprintf(w, "Client Hello packet (%d bytes):\n%s", len(r.TLS.ClientHello), hex.Dump(r.TLS.ClientHello))
|
|
|
|
})
|
|
|
|
|
2018-02-16 20:07:05 +00:00
|
|
|
s.start()
|
2016-11-03 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Si6iO+E0Sj9LXA
|
2016-11-03 21:13:18 +00:00
|
|
|
-----END CERTIFICATE-----`
|
|
|
|
ecdsaCert = `-----BEGIN CERTIFICATE-----
|
|
|
|
MIIBbTCCAROgAwIBAgIQZCsHZcs5ZkzV+zC2E6j5RzAKBggqhkjOPQQDAjASMRAw
|
|
|
|
DgYDVQQKEwdBY21lIENvMB4XDTE2MDkyNDE3NTE1OFoXDTI2MDkyMjE3NTE1OFow
|
|
|
|
EjEQMA4GA1UEChMHQWNtZSBDbzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABDTO
|
|
|
|
B3IyzjYfKCp2HWy+P3QHxhdBT4AUGYgwTiSEj5phumPIahFNcOSWptN0UzlZvJdN
|
|
|
|
MMjVmrFYK/FjF4abkNKjSzBJMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggr
|
|
|
|
BgEFBQcDATAMBgNVHRMBAf8EAjAAMBQGA1UdEQQNMAuCCWxvY2FsaG9zdDAKBggq
|
|
|
|
hkjOPQQDAgNIADBFAiEAp9W157PM1IadPBc33Cbj7vaFvp+rXs/hSuMCzP8pgV8C
|
|
|
|
IHCswo1qiC0ZjQmWsBlmz5Zbp9rOorIzBYmGRhRdNs3j
|
|
|
|
-----END CERTIFICATE-----`
|
|
|
|
ecdsaKey = `-----BEGIN EC PRIVATE KEY-----
|
|
|
|
MHcCAQEEIFdhO7IW5UIwpB1e2Vunm9QyKvUHWcVwGfLjhpOajuR7oAoGCCqGSM49
|
|
|
|
AwEHoUQDQgAENM4HcjLONh8oKnYdbL4/dAfGF0FPgBQZiDBOJISPmmG6Y8hqEU1w
|
|
|
|
5Jam03RTOVm8l00wyNWasVgr8WMXhpuQ0g==
|
|
|
|
-----END EC PRIVATE KEY-----`
|
|
|
|
)
|