refactor: small tweak for consistency
This commit is contained in:
1 parent
60ba8cb90d
commit
d25d295784
1 file changed
+2
-2
+2
-2
@@ -114,8 +114,8 @@ func (conn *LocalConnection) handshake(enc *gob.Encoder, dec *gob.Decoder, accep
|
||||
}
|
||||
conn.uid = localConnID ^ remoteConnID
|
||||
|
||||
remotePublicStr, rpErr := fv.Value("PublicKey")
|
||||
if usingPassword {
|
||||
remotePublicStr, rpErr := fv.Value("PublicKey")
|
||||
if rpErr != nil {
|
||||
return rpErr
|
||||
}
|
||||
@@ -131,7 +131,7 @@ func (conn *LocalConnection) handshake(enc *gob.Encoder, dec *gob.Decoder, accep
|
||||
conn.tcpSender = NewEncryptedTCPSender(enc, conn)
|
||||
conn.Decryptor = NewNaClDecryptor(conn)
|
||||
} else {
|
||||
if _, found := handshakeRecv["PublicKey"]; found {
|
||||
if rpErr == nil {
|
||||
return fmt.Errorf("Remote network is encrypted. Password required.")
|
||||
}
|
||||
conn.tcpSender = NewSimpleTCPSender(enc)
|
||||
|
||||
Reference in new issue
Block a user