hid: fix SSL 2.0 autodetection
This commit is contained in:
parent
fd1538251a
commit
3815795d59
|
@ -87,7 +87,7 @@ func detectTLS(sysconn syscall.RawConn) (isTLS bool) {
|
||||||
isTLS = buf[0]&0x80 != 0 && buf[2] == 1
|
isTLS = buf[0]&0x80 != 0 && buf[2] == 1
|
||||||
fallthrough
|
fallthrough
|
||||||
case n == 2:
|
case n == 2:
|
||||||
isTLS = buf[0] == 22 && buf[1] == 3
|
isTLS = isTLS || buf[0] == 22 && buf[1] == 3
|
||||||
case n == 1:
|
case n == 1:
|
||||||
isTLS = buf[0] == 22
|
isTLS = buf[0] == 22
|
||||||
case err == syscall.EAGAIN:
|
case err == syscall.EAGAIN:
|
||||||
|
|
Loading…
Reference in New Issue