From 1531c52ae9281845c02cdd3cbf8169a41d42bcfd Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Tue, 18 Jan 2022 12:12:40 +0100 Subject: [PATCH] Add support for RSA certificates, remove deprecated tls options --- OrbitalBeat.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/OrbitalBeat.go b/OrbitalBeat.go index ec95619..b2dffe5 100644 --- a/OrbitalBeat.go +++ b/OrbitalBeat.go @@ -878,9 +878,7 @@ func main() { tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, }, - PreferServerCipherSuites: false, - SessionTicketsDisabled: false, - Renegotiation: tls.RenegotiateFreelyAsClient, + SessionTicketsDisabled: false, NextProtos: []string{ "http/1.1", }, @@ -892,6 +890,14 @@ func main() { }, } + if serverCertificate.Leaf.PublicKeyAlgorithm == x509.RSA || bogusCertificate.Leaf.PublicKeyAlgorithm == x509.RSA { + tlsConfig.CipherSuites = append(tlsConfig.CipherSuites, []uint16{ + tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, + tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, + tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + }...) + } + if *http2Option { tlsConfig.NextProtos = []string{ "h2",