mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
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.
This commit is contained in:
parent
5997f54a71
commit
e214cd4a73
@ -2019,8 +2019,9 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
|||||||
dnl libssh2_version is a post 1.0 addition
|
dnl libssh2_version is a post 1.0 addition
|
||||||
dnl libssh2_init and libssh2_exit were added in 1.2.5
|
dnl libssh2_init and libssh2_exit were added in 1.2.5
|
||||||
dnl libssh2_scp_send64 was added in 1.2.6
|
dnl libssh2_scp_send64 was added in 1.2.6
|
||||||
|
dnl libssh2_session_handshake was added in 1.2.8
|
||||||
AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
|
AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
|
||||||
libssh2_scp_send64 )
|
libssh2_scp_send64 libssh2_session_handshake)
|
||||||
|
|
||||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
|
||||||
export LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH
|
||||||
|
@ -496,6 +496,13 @@ static int sshkeycallback(CURL *easy,
|
|||||||
(libssh2_uint64_t)d, 0, 0)
|
(libssh2_uint64_t)d, 0, 0)
|
||||||
#endif
|
#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
|
* 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
|
* blocking and without reaching the end. The data the pointer 'block' points
|
||||||
|
Loading…
Reference in New Issue
Block a user