Set OpenConnection.OtherHostname after successful auth proof
This commit is contained in:
parent
f6d6991f46
commit
733e00d6f9
|
@ -154,8 +154,8 @@ func (oc *OpenConnection) ValidateProof(channel int32, publicKeyBytes []byte, si
|
||||||
challenge := oc.authHandler[channel].GenChallenge(provisionalHostname, oc.MyHostname)
|
challenge := oc.authHandler[channel].GenChallenge(provisionalHostname, oc.MyHostname)
|
||||||
err = rsa.VerifyPKCS1v15(publicKey, crypto.SHA256, challenge[:], signature)
|
err = rsa.VerifyPKCS1v15(publicKey, crypto.SHA256, challenge[:], signature)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
oc.OtherHostname = provisionalHostname
|
||||||
return true
|
return true
|
||||||
|
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue