aboutsummaryrefslogtreecommitdiff
path: root/hid
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-08-04 21:13:28 +0200
committerPřemysl Janouch <p@janouch.name>2018-08-04 21:13:28 +0200
commit23f637dd47837a6f52e73bca42e14b1923a6dc95 (patch)
tree410b81ad4d091b2d7a20df7957f21558482514cc /hid
parent4cd460886e0b3d72a754f7348d9489e52d0c4ebe (diff)
downloadhaven-23f637dd47837a6f52e73bca42e14b1923a6dc95.tar.gz
haven-23f637dd47837a6f52e73bca42e14b1923a6dc95.tar.xz
haven-23f637dd47837a6f52e73bca42e14b1923a6dc95.zip
hid: fix SSL 2.0 autodetection
Diffstat (limited to 'hid')
-rw-r--r--hid/main.go2
1 files changed, 1 insertions, 1 deletions
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: