diff options
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/legacy.c | 4 | ||||
-rw-r--r-- | libssh/server.c | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/libssh/legacy.c b/libssh/legacy.c index b2ecc0e..83fb97a 100644 --- a/libssh/legacy.c +++ b/libssh/legacy.c @@ -233,7 +233,5 @@ char *string_to_char(ssh_string str){ } int ssh_accept(ssh_session session) { - (void) session; - - return SSH_OK; + return ssh_handle_key_exchange(session); } diff --git a/libssh/server.c b/libssh/server.c index f0b6237..f6ddf3d 100644 --- a/libssh/server.c +++ b/libssh/server.c @@ -666,7 +666,7 @@ int ssh_bind_accept(ssh_bind sshbind, ssh_session session) { ssh_private_key dsa = NULL; ssh_private_key rsa = NULL; socket_t fd = SSH_INVALID_SOCKET; - int i, rc; + int i; if (sshbind->bindfd == SSH_INVALID_SOCKET) { ssh_set_error(sshbind, SSH_FATAL, @@ -747,6 +747,13 @@ int ssh_bind_accept(ssh_bind sshbind, ssh_session session) { session->dsa_key = dsa; session->rsa_key = rsa; +return SSH_OK; +} + +/* Do the banner and key exchange */ +int ssh_handle_key_exchange(ssh_session session) { + int rc; + rc = ssh_send_banner(session, 1); if (rc < 0) { return SSH_ERROR; |