wrapper: Added a log message if client kex is empty.

Signed-off-by: Andreas Schneider <asn@cynapses.org>
This commit is contained in:
milo
2010-08-08 23:02:48 +02:00
committed by Andreas Schneider
parent 6d531ed0a6
commit d896d6393b

View File

@@ -223,10 +223,15 @@ int crypt_set_algorithms_server(ssh_session session){
enter_function();
/* out */
server = session->server_kex.methods[SSH_CRYPT_S_C];
client = session->client_kex.methods[SSH_CRYPT_S_C];
if(session && session->client_kex.methods) {
client = session->client_kex.methods[SSH_CRYPT_S_C];
} else {
ssh_log(session,SSH_LOG_PROTOCOL, "Client KEX empty");
}
/* That's the client algorithms that are more important */
match = ssh_find_matching(server,client);
if(!match){
ssh_set_error(session,SSH_FATAL,"Crypt_set_algorithms_server : no matching algorithm function found for %s",server);
free(match);