diff --git a/src/kex.c b/src/kex.c index 46d5e539..4da4958b 100644 --- a/src/kex.c +++ b/src/kex.c @@ -338,11 +338,11 @@ void ssh_list_kex(ssh_session session, struct ssh_kex_struct *kex) { #ifdef DEBUG_CRYPTO ssh_print_hexa("session cookie", kex->cookie, 16); #endif - if(kex->methods==NULL){ - ssh_log(session, SSH_LOG_RARE,"kex->methods is NULL"); - return; - } + for(i = 0; i < SSH_KEX_METHODS; i++) { + if (kex->methods[i] == NULL) { + continue; + } ssh_log(session, SSH_LOG_FUNCTIONS, "%s: %s", ssh_kex_nums[i], kex->methods[i]); }