summaryrefslogtreecommitdiff
path: root/lib/ssh.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-06-20 10:43:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-06-20 10:43:32 +0000
commit422fd933f508225d3d95128ba97ae3e38dff53dc (patch)
tree11a78f4d2d1a98996b8d9b8e3e8abb9316dee802 /lib/ssh.h
parent2594124825980231ffe024d00a9ac43bcb4c3553 (diff)
downloadcurl-422fd933f508225d3d95128ba97ae3e38dff53dc.tar.gz
- Hans-Jurgen May pointed out that trying SCP or SFTP over a SOCKS proxy
crashed libcurl. This is now addressed by making sure we use "plain send" internally when doing the socks handshake instead of the Curl_write() function which is designed to use the "target" protocol. That's then SCP or SFTP in this case. I also took the opportunity and cleaned up some ssh- related #ifdefs in the code for readability.
Diffstat (limited to 'lib/ssh.h')
-rw-r--r--lib/ssh.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/ssh.h b/lib/ssh.h
index e87b21ba3..9bbeaeda8 100644
--- a/lib/ssh.h
+++ b/lib/ssh.h
@@ -8,7 +8,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -37,6 +37,17 @@ ssize_t Curl_sftp_send(struct connectdata *conn, int sockindex,
const void *mem, size_t len);
ssize_t Curl_sftp_recv(struct connectdata *conn, int sockindex,
char *mem, size_t len);
+bool Curl_ssh_enabled(struct connectdata *conn,
+ int prot);
+
+#define Curl_ssh_enabled(conn,prot) (conn->protocol & prot)
+
+#else /* USE_LIBSSH2 */
+#define Curl_ssh_enabled(x,y) 0
+#define Curl_scp_send(a,b,c,d) 0
+#define Curl_sftp_send(a,b,c,d) 0
+#define Curl_scp_recv(a,b,c,d) 0
+#define Curl_sftp_recv(a,b,c,d) 0
#endif /* USE_LIBSSH2 */