hid: fix SSL 2.0 autodetection

This commit is contained in:
Přemysl Eric Janouch 2018-08-04 21:13:28 +02:00
parent 4cd460886e
commit 23f637dd47
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -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: