diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-04-16 12:08:11 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-04-16 12:08:11 +0000 |
commit | 24fc1b2028ed03ac7355c05ad2c93d81f0d5497a (patch) | |
tree | 7668ab141dc294d13d1ed43d300bbb3a219ab667 /libssh/server.c | |
parent | c608883205b986e8c5192919e7c1f44715b5bb31 (diff) | |
download | libssh-24fc1b2028ed03ac7355c05ad2c93d81f0d5497a.tar.gz libssh-24fc1b2028ed03ac7355c05ad2c93d81f0d5497a.tar.xz libssh-24fc1b2028ed03ac7355c05ad2c93d81f0d5497a.zip |
Make dh crypto functions thread safe.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@491 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/server.c')
-rw-r--r-- | libssh/server.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/server.c b/libssh/server.c index 358b13e7..7193a285 100644 --- a/libssh/server.c +++ b/libssh/server.c @@ -332,7 +332,9 @@ static int dh_handshake_server(SSH_SESSION *session){ /* do the banner and key exchange */ int ssh_accept(SSH_SESSION *session){ ssh_send_banner(session,1); - ssh_crypto_init(); + if (ssh_crypto_init(session) < 0) { + return -1; + } session->alive=1; session->clientbanner=ssh_get_banner(session); if (server_set_kex(session) < 0) { |