mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
Make better error messages for SSH1 errors
This commit is contained in:
@@ -580,6 +580,16 @@ void ssh_connection_callback(ssh_session session){
|
|||||||
session->version = 2;
|
session->version = 2;
|
||||||
} else if(ssh1 && session->ssh1) {
|
} else if(ssh1 && session->ssh1) {
|
||||||
session->version = 1;
|
session->version = 1;
|
||||||
|
} else if(ssh1 && !session->ssh1){
|
||||||
|
#ifdef WITH_SSH1
|
||||||
|
ssh_set_error(session, SSH_FATAL,
|
||||||
|
"SSH-1 protocol not available (configure session to allow SSH-1)");
|
||||||
|
goto error;
|
||||||
|
#else
|
||||||
|
ssh_set_error(session, SSH_FATAL,
|
||||||
|
"SSH-1 protocol not available (libssh compiled without SSH-1 support)");
|
||||||
|
goto error;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
ssh_set_error(session, SSH_FATAL,
|
ssh_set_error(session, SSH_FATAL,
|
||||||
"No version of SSH protocol usable (banner: %s)",
|
"No version of SSH protocol usable (banner: %s)",
|
||||||
|
|||||||
Reference in New Issue
Block a user