[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 267/411: libssh2: require version 1.0 or later
From: |
gnunet |
Subject: |
[gnurl] 267/411: libssh2: require version 1.0 or later |
Date: |
Wed, 13 Jan 2021 01:21:22 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 4bfca0a80763a1184a4ca489bf739abd5a5657c5
Author: Daniel Stenberg <daniel@haxx.se>
AuthorDate: Thu Oct 22 12:29:21 2020 +0200
libssh2: require version 1.0 or later
... and simplify the code accordingly. libssh2 version 1.0 was released
in April 2009.
Closes #6116
---
configure.ac | 3 ++-
docs/INTERNALS.md | 2 +-
lib/vssh/libssh2.c | 22 ----------------------
3 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8676b4825..d4ccc268a 100755
--- a/configure.ac
+++ b/configure.ac
@@ -3062,7 +3062,8 @@ if test X"$OPT_LIBSSH2" != Xno; then
CPPFLAGS="$CPPFLAGS $CPP_SSH2"
LIBS="$LIB_SSH2 $LIBS"
- AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
+ dnl check for function added in libssh2 version 1.0
+ AC_CHECK_LIB(ssh2, libssh2_session_block_directions)
AC_CHECK_HEADERS(libssh2.h,
curl_ssh_msg="enabled (libSSH2)"
diff --git a/docs/INTERNALS.md b/docs/INTERNALS.md
index e9be0889a..9885c9901 100644
--- a/docs/INTERNALS.md
+++ b/docs/INTERNALS.md
@@ -87,7 +87,7 @@ Dependencies
- OpenSSL 0.9.7
- GnuTLS 3.1.10
- zlib 1.1.4
- - libssh2 0.16
+ - libssh2 1.0
- c-ares 1.6.0
- libidn2 2.0.0
- wolfSSL 2.0.0
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
index d983cc9a9..6c6db049b 100644
--- a/lib/vssh/libssh2.c
+++ b/lib/vssh/libssh2.c
@@ -2887,7 +2887,6 @@ static CURLcode ssh_statemach_act(struct connectdata
*conn, bool *block)
static int ssh_perform_getsock(const struct connectdata *conn,
curl_socket_t *sock)
{
-#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
int bitmap = GETSOCK_BLANK;
sock[0] = conn->sock[FIRSTSOCKET];
@@ -2899,11 +2898,6 @@ static int ssh_perform_getsock(const struct connectdata
*conn,
bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET);
return bitmap;
-#else
- /* if we don't know the direction we can use the generic *_getsock()
- function even for the protocol_connect and doing states */
- return Curl_single_getsock(conn, sock);
-#endif
}
/* Generic function called by the multi interface to figure out what socket(s)
@@ -2911,20 +2905,11 @@ static int ssh_perform_getsock(const struct connectdata
*conn,
static int ssh_getsock(struct connectdata *conn,
curl_socket_t *sock)
{
-#ifndef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
- (void)conn;
- (void)sock;
- /* if we don't know any direction we can just play along as we used to and
- not provide any sensible info */
- return GETSOCK_BLANK;
-#else
/* if we know the direction we can use the generic *_getsock() function even
for the protocol_connect and doing states */
return ssh_perform_getsock(conn, sock);
-#endif
}
-#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
/*
* When one of the libssh2 functions has returned LIBSSH2_ERROR_EAGAIN this
* function is used to figure out in what direction and stores this info so
@@ -2949,10 +2934,6 @@ static void ssh_block2waitfor(struct connectdata *conn,
bool block)
the original set */
conn->waitfor = sshc->orig_waitfor;
}
-#else
- /* no libssh2 directional support so we simply don't know */
-#define ssh_block2waitfor(x,y) Curl_nop_stmt
-#endif
/* called repeatedly until done from multi.c */
static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done)
@@ -3001,7 +2982,6 @@ static CURLcode ssh_block_statemach(struct connectdata
*conn,
return CURLE_OPERATION_TIMEDOUT;
}
-#ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION
if(block) {
int dir = libssh2_session_block_directions(sshc->ssh_session);
curl_socket_t sock = conn->sock[FIRSTSOCKET];
@@ -3015,8 +2995,6 @@ static CURLcode ssh_block_statemach(struct connectdata
*conn,
(void)Curl_socket_check(fd_read, CURL_SOCKET_BAD, fd_write,
left>1000?1000:left);
}
-#endif
-
}
return result;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 352/411: KNOWN_BUGS: cmake: libspsl is not supported, (continued)
- [gnurl] 352/411: KNOWN_BUGS: cmake: libspsl is not supported, gnunet, 2021/01/12
- [gnurl] 284/411: tool_operate: bail out proper on errors for parallel setup, gnunet, 2021/01/12
- [gnurl] 288/411: acinclude: detect manually set minimum macos/ipod version, gnunet, 2021/01/12
- [gnurl] 375/411: test506: make it not run in c-ares builds, gnunet, 2021/01/12
- [gnurl] 306/411: rtsp: error out on empty Session ID, unified the code, gnunet, 2021/01/12
- [gnurl] 266/411: KNOWN_BUGS: mention the individual cmake issues, gnunet, 2021/01/12
- [gnurl] 362/411: KNOWN_BUGS: wakeup socket disconnect causes havoc, gnunet, 2021/01/12
- [gnurl] 317/411: FAQ: refreshed, gnunet, 2021/01/12
- [gnurl] 322/411: FAQ: refresh "Why do I get "certificate verify failed", gnunet, 2021/01/12
- [gnurl] 302/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 267/411: libssh2: require version 1.0 or later,
gnunet <=
- [gnurl] 286/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 308/411: KNOWN_BUGS: LDAPS with NSS is slow, gnunet, 2021/01/12
- [gnurl] 299/411: hsts: add support for Strict-Transport-Security, gnunet, 2021/01/12
- [gnurl] 300/411: hsts: add read/write callbacks, gnunet, 2021/01/12
- [gnurl] 320/411: url: make sure an HSTS upgrade updates URL and scheme correctly, gnunet, 2021/01/12
- [gnurl] 369/411: examples: update .gitignore, gnunet, 2021/01/12
- [gnurl] 328/411: examples/httpput: remove use of CURLOPT_PUT, gnunet, 2021/01/12
- [gnurl] 325/411: configure: pass -pthread to Libs.private for pkg-config, gnunet, 2021/01/12
- [gnurl] 301/411: curlver: bumped to 7.74.0, gnunet, 2021/01/12
- [gnurl] 332/411: mqttd: fclose test file when done, gnunet, 2021/01/12