From 3b94a1d826e19e44b9516551231d87024384c469 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 6 Oct 2021 17:58:24 +0300 Subject: [PATCH] GOST is only for TLS 1.3 --- tls_gost.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tls_gost.go b/tls_gost.go index a4ab28d..1ad67b4 100644 --- a/tls_gost.go +++ b/tls_gost.go @@ -5,6 +5,16 @@ package godlighty import "crypto/tls" func CHIHasGOST(chi *tls.ClientHelloInfo) bool { + tls13Found := false + for _, v := range chi.SupportedVersions { + if v == tls.VersionTLS13 { + tls13Found = true + break + } + } + if !tls13Found { + return false + } for _, ss := range chi.SignatureSchemes { switch ss { case tls.GOSTR34102012256A, tls.GOSTR34102012256B, tls.GOSTR34102012256C, tls.GOSTR34102012256D, tls.GOSTR34102012512A, tls.GOSTR34102012512B, tls.GOSTR34102012512C: -- 2.44.0