update package s2ioperator

Signed-off-by: soulseen <sunzhu@yunify.com>
This commit is contained in:
soulseen
2019-08-30 10:37:09 +08:00
parent f22e8ea90e
commit bbd151e7aa
300 changed files with 18100 additions and 52462 deletions

View File

@@ -543,8 +543,7 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error {
clientInit := otherInit
serverInit := t.sentInitMsg
isClient := len(t.hostKeys) == 0
if isClient {
if len(t.hostKeys) == 0 {
clientInit, serverInit = serverInit, clientInit
magics.clientKexInit = t.sentInitPacket
@@ -552,7 +551,7 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error {
}
var err error
t.algorithms, err = findAgreedAlgorithms(isClient, clientInit, serverInit)
t.algorithms, err = findAgreedAlgorithms(clientInit, serverInit)
if err != nil {
return err
}