diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index a05e30275..c714e2c3c 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -98,7 +98,7 @@ func (s *apiSvc) getListener(guiCfg config.GUIConfiguration) (net.Listener, erro name = tlsDefaultCommonName } - cert, err = tlsutil.NewCertificate(locations[locHTTPSCertFile], locations[locHTTPSKeyFile], name, tlsRSABits) + cert, err = tlsutil.NewCertificate(locations[locHTTPSCertFile], locations[locHTTPSKeyFile], name, httpsRSABits) } if err != nil { return nil, err diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index d21e03d7d..b842683c0 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -70,7 +70,8 @@ const ( const ( bepProtocolName = "bep/1.0" tlsDefaultCommonName = "syncthing" - tlsRSABits = 3072 + httpsRSABits = 2048 + bepRSABits = 0 // 384 bit ECDSA used instead pingEventInterval = time.Minute maxSystemErrors = 5 initialSystemLog = 10 @@ -378,7 +379,7 @@ func generate(generateDir string) { l.Warnln("Key exists; will not overwrite.") l.Infoln("Device ID:", protocol.NewDeviceID(cert.Certificate[0])) } else { - cert, err = tlsutil.NewCertificate(certFile, keyFile, tlsDefaultCommonName, tlsRSABits) + cert, err = tlsutil.NewCertificate(certFile, keyFile, tlsDefaultCommonName, bepRSABits) if err != nil { l.Fatalln("Create certificate:", err) } @@ -501,8 +502,8 @@ func syncthingMain() { // Ensure that that we have a certificate and key. cert, err := tls.LoadX509KeyPair(locations[locCertFile], locations[locKeyFile]) if err != nil { - l.Infof("Generating RSA key and certificate for %s...", tlsDefaultCommonName) - cert, err = tlsutil.NewCertificate(locations[locCertFile], locations[locKeyFile], tlsDefaultCommonName, tlsRSABits) + l.Infof("Generating ECDSA key and certificate for %s...", tlsDefaultCommonName) + cert, err = tlsutil.NewCertificate(locations[locCertFile], locations[locKeyFile], tlsDefaultCommonName, bepRSABits) if err != nil { l.Fatalln(err) } diff --git a/lib/tlsutil/tlsutil.go b/lib/tlsutil/tlsutil.go index f8e5365e6..298b83561 100644 --- a/lib/tlsutil/tlsutil.go +++ b/lib/tlsutil/tlsutil.go @@ -8,6 +8,8 @@ package tlsutil import ( "bufio" + "crypto/ecdsa" + "crypto/elliptic" "crypto/rand" "crypto/rsa" "crypto/tls" @@ -27,8 +29,17 @@ var ( ErrIdentificationFailed = fmt.Errorf("failed to identify socket type") ) +// NewCertificate generates and returns a new TLS certificate. If tlsRSABits +// is greater than zero we generate an RSA certificate with the specified +// number of bits. Otherwise we create a 384 bit ECDSA certificate. func NewCertificate(certFile, keyFile, tlsDefaultCommonName string, tlsRSABits int) (tls.Certificate, error) { - priv, err := rsa.GenerateKey(rand.Reader, tlsRSABits) + var priv interface{} + var err error + if tlsRSABits > 0 { + priv, err = rsa.GenerateKey(rand.Reader, tlsRSABits) + } else { + priv, err = ecdsa.GenerateKey(elliptic.P384(), rand.Reader) + } if err != nil { return tls.Certificate{}, fmt.Errorf("generate key: %s", err) } @@ -47,10 +58,9 @@ func NewCertificate(certFile, keyFile, tlsDefaultCommonName string, tlsRSABits i KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth}, BasicConstraintsValid: true, - SignatureAlgorithm: x509.SHA256WithRSA, } - derBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, &priv.PublicKey, priv) + derBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, publicKey(priv), priv) if err != nil { return tls.Certificate{}, fmt.Errorf("create cert: %s", err) } @@ -72,7 +82,13 @@ func NewCertificate(certFile, keyFile, tlsDefaultCommonName string, tlsRSABits i if err != nil { return tls.Certificate{}, fmt.Errorf("save key: %s", err) } - err = pem.Encode(keyOut, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)}) + + block, err := pemBlockForKey(priv) + if err != nil { + return tls.Certificate{}, fmt.Errorf("save key: %s", err) + } + + err = pem.Encode(keyOut, block) if err != nil { return tls.Certificate{}, fmt.Errorf("save key: %s", err) } @@ -136,3 +152,29 @@ type UnionedConnection struct { func (c *UnionedConnection) Read(b []byte) (n int, err error) { return c.Reader.Read(b) } + +func publicKey(priv interface{}) interface{} { + switch k := priv.(type) { + case *rsa.PrivateKey: + return &k.PublicKey + case *ecdsa.PrivateKey: + return &k.PublicKey + default: + return nil + } +} + +func pemBlockForKey(priv interface{}) (*pem.Block, error) { + switch k := priv.(type) { + case *rsa.PrivateKey: + return &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k)}, nil + case *ecdsa.PrivateKey: + b, err := x509.MarshalECPrivateKey(k) + if err != nil { + return nil, err + } + return &pem.Block{Type: "EC PRIVATE KEY", Bytes: b}, nil + default: + return nil, fmt.Errorf("unknown key type") + } +} diff --git a/test/h1/config.xml b/test/h1/config.xml index bf1d60e27..ee9e510df 100644 --- a/test/h1/config.xml +++ b/test/h1/config.xml @@ -1,7 +1,7 @@ - + 1 @@ -18,7 +18,7 @@ - + 1 1 @@ -37,7 +37,7 @@
tcp://127.0.0.1:22001
- +
tcp://127.0.0.1:22002
diff --git a/test/h2/cert.pem b/test/h2/cert.pem index 46e3c73f9..0ddc3cde7 100644 --- a/test/h2/cert.pem +++ b/test/h2/cert.pem @@ -1,23 +1,11 @@ -----BEGIN CERTIFICATE----- -MIID3jCCAkigAwIBAgIBADALBgkqhkiG9w0BAQUwFDESMBAGA1UEAxMJc3luY3Ro -aW5nMB4XDTE0MDMxNDA3MDEwNFoXDTQ5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJ -c3luY3RoaW5nMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAsIV0syyR -O56BvIOro4bIqB6iFJsNc4zX8MiM4QPTWgqGlYwsKSVmNppTdlACZCJIqyzoscrF -qJPto8/e2Fc3oaTdEREGIs7cmc7LSXfot/mAgPpy71SVWtb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gYIKoZIzj0EAwMwFDESMBAGA1UEAxMJ +c3luY3RoaW5nMB4XDTE1MTEyNzA4MDA1N1oXDTQ5MTIzMTIzNTk1OVowFDESMBAG +A1UEAxMJc3luY3RoaW5nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE7iI2E5etAs53 +6s+SUV3HKZeK55iHUY6X4PHePjyvNxOCZ6GvbErOXWqumU4+vzVREW1wvNtGXAtv +z/hsHIPJ7EdKIX0QPATms2NplCbaFlUxHBpUzhlNulhsoV5ajn7yoz8wPTAOBgNV +HQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1Ud +EwEB/wQCMAAwCgYIKoZIzj0EAwMDaQAwZgIxAPe+pj6NrQiK720v/9IMDPWIRxqt +hxgy03YGzbQskXRDJVvLU49HCHV+8JNL6WwgKgIxALA+RdYb0qDxhcdtt57Zu3A1 +eQZEvsJg9FGJOjYDnxZYqEpNZSgTwgcRvGH1Srt37w== -----END CERTIFICATE----- diff --git a/test/h2/config.xml b/test/h2/config.xml index 1ea6a0a30..4ba57cd94 100644 --- a/test/h2/config.xml +++ b/test/h2/config.xml @@ -1,7 +1,7 @@ - + 1 @@ -16,10 +16,11 @@ 0 0 -1 + false - + 1 1 @@ -31,9 +32,10 @@ 0 0 -1 + false - + 1 @@ -46,11 +48,12 @@ 0 0 -1 + false
tcp://127.0.0.1:22001
- +
tcp://127.0.0.1:22002
@@ -91,7 +94,6 @@ 5 true false - 0 1 https://api.github.com/repos/syncthing/syncthing/releases?per_page=30 diff --git a/test/h2/https-cert.pem b/test/h2/https-cert.pem index 902be52a6..ad8b99adc 100644 --- a/test/h2/https-cert.pem +++ b/test/h2/https-cert.pem @@ -1,23 +1,18 @@ -----BEGIN CERTIFICATE----- -MIID5TCCAk+gAwIBAgIIX9LzFBcO3tkwCwYJKoZIhvcNAQELMBQxEjAQBgNVBAMT -CXN5bmN0aGluZzAeFw0xNDA5MTQyMjIzMzNaFw00O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ELNA0szlSQGwWfe +0Aw1k6RrKz45iZPQ9HbRB3bF7t/gJVeN+uo484NZQG7cnej4zXEooL6W5jfo/ECr +vqe+Ym0B+xIRsfn0FApfVUqZkA== -----END CERTIFICATE----- diff --git a/test/h2/https-key.pem b/test/h2/https-key.pem index b2dc95e85..fd691d559 100644 --- a/test/h2/https-key.pem +++ b/test/h2/https-key.pem @@ -1,39 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIG4wIBAAKCAYEAnhlGV/ZpojqJTrEWEWEknia8tNaIDj8dLciwUDPmq98lSvf3 -8bnXFMT+ZLAVAioYjzsL7QQ4UMfCjWAigHp3v4aDCz/WRizqhaWGLnNmn+BGn4eR -AubLVC/UrIKs7M8tYKECBbNtI329D1kf8uW5Z+Z2kKFqoiJI1EYT4qzuPWGbWB70 -ez1PNW5IfQRQBWg484Jj3Q4wDp7xtVdEIURPWpxL+O+qBVkon8u0PaYOfRL61db5 -t+chpUn5Enz7z04vwAv6K5+2HnorzUIbwA/4LPP+y7XExexLnq0sXhKO6pyKqq1I -IfggmJ2LeLaSoI8WIafzEdR8ZnUV81bl1zpsxYABSUTTgbnDm+wAPSGnD+ba8YqM -jp9P2oe3zp6a/P+5h3Za6loS9x16++s3m0lksETZoXJuiQOzOX4BMS1ORlu884LZ -wrIAQ1K17pJ+9lYe3+a8PRbow/WjO1EVFABJgbg6y9w//gk1zNFNZg0mnBVYe5Be -XQOcKmli4X5BBaYvAgMBAAECggGAR/XtJMCOGD9YnC7Sgpqa1jl/jzhOuV1U5LAC -QJ8/EWACU3tGqgoSsetwd1gGV/PdNeSEax+OmoYyMbNeQOh9dPm+z/IAj/SF0ssi -piX0wjSNMLO993ohdnJG9TaNi0RJvT/L8dhXht4GnePNPPv/RiGKOg6ewKmmSKiV -CIn57ops8NE2KpofYYyPBghee/eSZJQm7Ek26pDCJ+5Onm2/SNj3Y5mC4+hPK1zG -74CT+64V6httkp1rnRZsflPRMey97AdzKhnUS/aEdowxyETamp4CY3UzM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JxyH737Mib8eJTkuzOCj2r4rqrClR4Fh/mZmtwMRHGh2R -UpJJ3CreS0cmyBo7yAS+4+HdzEZCT5Y/73+aWO/4hIMVnl+pYQKBwCpUb85zm5zg -UnZ8nBS22FLGTcvBs8hbyXUtioSNadNteuqk6jsN2F+Pwsh6eHbVHW4Lu9j6Gn+J -S1ss/ztgGkErvQF/9DpxMeYt01FpvZaUJthThQVQ9xvr9i7utgthtdspNvQ0fux1 -9Xg2fhLnDz707PUt7OhmVW7d+XOfoc19mYZlN0IOHsqMUMphIW97Lp5QWlZXxr23 -Zrv2j5mTvv3Fq2TRDNfz5dwijFMvv7kpGfHA1950ZIbobQvYYsoC7A== ------END RSA PRIVATE KEY----- +-----BEGIN EC PRIVATE KEY----- +MIGkAgEBBDBz4/RQhZfObYcjS4t5bZthw0Pj6YliqI357mdB6hfiQgMdTB8v7jnO +Scbil+Rri0+gBwYFK4EEACKhZANiAATuIjYTl60Cznfqz5JRXccpl4rnmIdRjpfg +8d4+PK83E4Jnoa9sSs5daq6ZTj6/NVERbXC820ZcC2/P+Gwcg8nsR0ohfRA8BOaz +Y2mUJtoWVTEcGlTOGU26WGyhXlqOfvI= +-----END EC PRIVATE KEY----- diff --git a/test/h3/config.xml b/test/h3/config.xml index 7896528a5..8da8679e9 100644 --- a/test/h3/config.xml +++ b/test/h3/config.xml @@ -1,6 +1,6 @@ - + 1 @@ -16,7 +16,7 @@ - + 1 @@ -35,7 +35,7 @@
tcp://127.0.0.1:22001
- +
tcp://127.0.0.1:22002
diff --git a/test/util.go b/test/util.go index 8b08aa69e..99db0a212 100644 --- a/test/util.go +++ b/test/util.go @@ -37,7 +37,7 @@ func init() { const ( id1 = "I6KAH76-66SLLLB-5PFXSOA-UFJCDZC-YAOMLEK-CP2GB32-BV5RQST-3PSROAU" - id2 = "JMFJCXB-GZDE4BN-OCJE3VF-65GYZNU-AIVJRET-3J6HMRQ-AUQIGJO-FKNHMQU" + id2 = "MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" id3 = "373HSRP-QLPNLIE-JYKZVQF-P4PKZ63-R2ZE6K3-YD442U2-JHBGBQG-WWXAHAU" apiKey = "abc123" )