diff options
author | milo <milo@r0ot.me> | 2010-08-10 00:14:03 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cynapses.org> | 2010-08-10 00:30:25 +0200 |
commit | 855b73de8745adfef145dba0b07ab37dcb83c142 (patch) | |
tree | 866f428455b401c6f143864765e77f43e8cad9e7 /libssh/server.c | |
parent | 136f4d3b0d7475ae212dcf824c3ff624a97a08ad (diff) | |
download | libssh-855b73de8745adfef145dba0b07ab37dcb83c142.tar.gz libssh-855b73de8745adfef145dba0b07ab37dcb83c142.tar.xz libssh-855b73de8745adfef145dba0b07ab37dcb83c142.zip |
server: Split ssh_bind_accept and create ssh_handle_key_exchange.
Signed-off-by: Andreas Schneider <asn@cynapses.org>
Diffstat (limited to 'libssh/server.c')
-rw-r--r-- | libssh/server.c | 9 |
1 files changed, 8 insertions, 1 deletions
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; |