diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-09-01 16:05:06 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-09-01 16:05:06 +0200 |
commit | e67d834156a381fe7ef7933d135130083b86d1e3 (patch) | |
tree | e8f3485bc07f19cc2f2bef6ad0ef11af0606984d /libssh/keyfiles.c | |
parent | a93f2d8bfe98e2927fc7024973c52062ccd28b30 (diff) | |
download | libssh-e67d834156a381fe7ef7933d135130083b86d1e3.tar.gz libssh-e67d834156a381fe7ef7933d135130083b86d1e3.tar.xz libssh-e67d834156a381fe7ef7933d135130083b86d1e3.zip |
Fix initialization of threading
Diffstat (limited to 'libssh/keyfiles.c')
-rw-r--r-- | libssh/keyfiles.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c index 03782799..9512de0a 100644 --- a/libssh/keyfiles.c +++ b/libssh/keyfiles.c @@ -1615,6 +1615,12 @@ int ssh_is_server_known(ssh_session session) { return SSH_SERVER_ERROR; } + if (session->current_crypto == NULL){ + ssh_set_error(session, SSH_FATAL, + "ssh_is_host_known called without cryptographic context"); + leave_function(); + return SSH_SERVER_ERROR; + } host = ssh_lowercase(session->host); hostport = ssh_hostport(host,session->port); if (host == NULL || hostport == NULL) { |