summaryrefslogtreecommitdiffstats
path: root/libssh/client.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-16 14:55:38 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-16 14:55:38 +0000
commita092a841395f6848a9ef82ec315d0b1cf6afe641 (patch)
tree1a056eea376ba47668fd8b29f042af1d55bebb27 /libssh/client.c
parentc6eb54c39e4663c8f9ea82e8bf29bfdb3c8d945a (diff)
downloadlibssh-a092a841395f6848a9ef82ec315d0b1cf6afe641.tar.gz
libssh-a092a841395f6848a9ef82ec315d0b1cf6afe641.tar.xz
libssh-a092a841395f6848a9ef82ec315d0b1cf6afe641.zip
Add return value to dh_build_k().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@506 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/client.c')
-rw-r--r--libssh/client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libssh/client.c b/libssh/client.c
index 166eb3a..f8d95d9 100644
--- a/libssh/client.c
+++ b/libssh/client.c
@@ -266,7 +266,11 @@ static int dh_handshake(SSH_SESSION *session) {
goto error;
}
session->dh_server_signature = signature;
- dh_build_k(session);
+ if (dh_build_k(session) < 0) {
+ ssh_set_error(session, SSH_FATAL, "Cannot build k number");
+ rc = SSH_ERROR;
+ goto error;
+ }
/* Send the MSG_NEWKEYS */
if (buffer_add_u8(session->out_buffer, SSH2_MSG_NEWKEYS) < 0) {