From 733e00d6f9c946b3c2b50d266058322866d4f5ed Mon Sep 17 00:00:00 2001 From: John Brooks Date: Sat, 1 Oct 2016 15:51:55 -0700 Subject: [PATCH] Set OpenConnection.OtherHostname after successful auth proof --- openconnection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openconnection.go b/openconnection.go index 3138f8a..8701084 100644 --- a/openconnection.go +++ b/openconnection.go @@ -154,8 +154,8 @@ func (oc *OpenConnection) ValidateProof(channel int32, publicKeyBytes []byte, si challenge := oc.authHandler[channel].GenChallenge(provisionalHostname, oc.MyHostname) err = rsa.VerifyPKCS1v15(publicKey, crypto.SHA256, challenge[:], signature) if err == nil { + oc.OtherHostname = provisionalHostname return true - } return false