mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
known_hosts: Added a log message for key type mismatch.
This commit is contained in:
@@ -474,6 +474,12 @@ int ssh_is_server_known(ssh_session session) {
|
||||
if (match) {
|
||||
/* We got a match. Now check the key type */
|
||||
if (strcmp(session->current_crypto->server_pubkey_type, type) != 0) {
|
||||
ssh_log(session,
|
||||
SSH_LOG_PACKET,
|
||||
"ssh_is_server_known: server type [%s] doesn't match the "
|
||||
"type [%s] in known_hosts file",
|
||||
session->current_crypto->server_pubkey_type,
|
||||
type);
|
||||
/* Different type. We don't override the known_changed error which is
|
||||
* more important */
|
||||
if (ret != SSH_SERVER_KNOWN_CHANGED)
|
||||
|
||||
Reference in New Issue
Block a user