aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-10-20 23:31:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-10-20 23:31:34 +0200
commite214cd4a7323e0326bb9a731c4effdbb4082c85f (patch)
treea6b4113f41b3ac57d2e66cd92e26f1e4e88325f3 /lib/ssh.c
parent5997f54a715a7304c39ee946a3c460f03dde1a8a (diff)
SSH: use libssh2_session_handshake()
In libssh2 1.2.8, libssh2_session_handshake() replaces libssh2_session_startup() to fix the previous portability problem with the socket type that was too small for win64 and thus easily could cause crashes and more.
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index ee63a7bd6..862ce76f6 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -497,6 +497,13 @@ static int sshkeycallback(CURL *easy,
#endif
/*
+ * libssh2 1.2.8 fixed the problem with 32bit ints used for sockets on win64.
+ */
+#ifdef HAVE_LIBSSH2_SESSION_HANDSHAKE
+#define libssh2_session_startup(x,y) libssh2_session_handshake(x,y)
+#endif
+
+/*
* ssh_statemach_act() runs the SSH state machine as far as it can without
* blocking and without reaching the end. The data the pointer 'block' points
* to will be set to TRUE if the libssh2 function returns LIBSSH2_ERROR_EAGAIN