]> Sergey Matveev's repositories - godlighty.git/blobdiff - tls_gost.go
Git's .bundle MIME type
[godlighty.git] / tls_gost.go
index a4ab28da5edac70aea776999d5371d529e6436a6..6500443621ac919401b0bbe75fe11ff55cdaf445 100644 (file)
@@ -1,10 +1,21 @@
 //go:build !nogostls13
+// +build !nogostls13
 
 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: