From 23f637dd47837a6f52e73bca42e14b1923a6dc95 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Sat, 4 Aug 2018 21:13:28 +0200 Subject: hid: fix SSL 2.0 autodetection --- hid/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hid/main.go b/hid/main.go index 0026d55..69978b6 100644 --- a/hid/main.go +++ b/hid/main.go @@ -87,7 +87,7 @@ func detectTLS(sysconn syscall.RawConn) (isTLS bool) { isTLS = buf[0]&0x80 != 0 && buf[2] == 1 fallthrough case n == 2: - isTLS = buf[0] == 22 && buf[1] == 3 + isTLS = isTLS || buf[0] == 22 && buf[1] == 3 case n == 1: isTLS = buf[0] == 22 case err == syscall.EAGAIN: -- cgit v1.2.3-70-g09d2