mirror of
https://github.com/libssh2/libssh2.git
synced 2025-08-07 08:02:56 +03:00
known_hosts: Fail when parsing unknown keys in known_hosts file.
libssh2_knownhost_readfile() silently ignored problems when reading keys in unsupported formats from the known hosts file. When the file is written again from the internal structures of libssh2 it gets truntcated to the point where the first unknown key was located. * src/knownhost.c:libssh2_knownhost_readfile() - return error if key parsing fails
This commit is contained in:
committed by
Daniel Stenberg
parent
05641218bc
commit
6af85b6053
@@ -405,6 +405,7 @@ typedef struct _LIBSSH2_POLLFD {
|
||||
#define LIBSSH2_ERROR_SOCKET_RECV -43
|
||||
#define LIBSSH2_ERROR_ENCRYPT -44
|
||||
#define LIBSSH2_ERROR_BAD_SOCKET -45
|
||||
#define LIBSSH2_ERROR_KNOWN_HOSTS -46
|
||||
|
||||
/* this is a define to provide the old (<= 1.2.7) name */
|
||||
#define LIBSSH2_ERROR_BANNER_NONE LIBSSH2_ERROR_BANNER_RECV
|
||||
|
Reference in New Issue
Block a user