Added return code SSH_SERVER_FILE_NOT_FOUND
This error is returned by ssh_is_server_known when known_hosts file does not exist and gives more action to the developer.
Этот коммит содержится в:
родитель
052073c36d
Коммит
d5b6f6cc37
@ -134,6 +134,7 @@ typedef int socket_t;
|
||||
#define SSH_SERVER_KNOWN_OK 1
|
||||
#define SSH_SERVER_KNOWN_CHANGED 2
|
||||
#define SSH_SERVER_FOUND_OTHER 3
|
||||
#define SSH_SERVER_FILE_NOT_FOUND 4
|
||||
|
||||
#ifndef MD5_DIGEST_LEN
|
||||
#define MD5_DIGEST_LEN 16
|
||||
|
@ -1361,10 +1361,10 @@ int ssh_is_server_known(SSH_SESSION *session) {
|
||||
enter_function();
|
||||
|
||||
if (ssh_options_default_known_hosts_file(session->options) < 0) {
|
||||
ssh_set_error(session, SSH_FATAL,
|
||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
||||
"Can't find a known_hosts file");
|
||||
leave_function();
|
||||
return SSH_SERVER_ERROR;
|
||||
return SSH_SERVER_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (session->options->host == NULL) {
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user