SshSessionImpl.enforceNegotiatedHostKey
private
void enforceNegotiatedHostKey(string keyAlgorithm,
string signatureAlgorithm)Binds the presented host key and signature to the negotiated host-key algorithm (RFC 4253 section 7.1).
RSA keys keep the ssh-rsa blob name while the signature must match the negotiated SHA-2 name exactly; every other algorithm must agree in both places.
Parameters
keyAlgorithm | Blob algorithm of the presented host key. |
signatureAlgorithm | Algorithm named by the signature blob. |
Throws
SshKeyException on any mismatch.