fixed Two-Way-SSL error

This commit is contained in:
laijinman 2019-10-07 15:09:22 +08:00
parent e62d9a5242
commit 4bd1448490
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ import (
"strings"
)
var version string = "0.29.0"
var version string = "0.29.1"
func Full() string {
return version

View File

@ -119,8 +119,8 @@ func readHandshake(rd io.Reader) (host string, err error) {
extensionsLength := int(data[0])<<8 | int(data[1])
data = data[2:]
if extensionsLength != len(data) {
err = fmt.Errorf("readHandshake: extensionsLen[%d] is not equal to dataLen[%d]", extensionsLength, len(data))
if extensionsLength < len(data) {
err = fmt.Errorf("readHandshake: extensionsLen[%d] less than dataLen[%d]", extensionsLength, len(data))
return
}
for len(data) != 0 {