diff options
-rw-r--r-- | kftpgrabber/src/Makefile.am | 2 | ||||
-rw-r--r-- | kftpgrabber/src/engine/ftpsocket.cpp | 12 | ||||
-rw-r--r-- | kftpgrabber/src/engine/ssl.cpp | 4 | ||||
-rw-r--r-- | kftpgrabber/src/misc/kftpgrabber.kcfg | 2 | ||||
-rw-r--r-- | kftpgrabber/src/misc/libs/ssh/wrapper.c | 2 |
5 files changed, 14 insertions, 8 deletions
diff --git a/kftpgrabber/src/Makefile.am b/kftpgrabber/src/Makefile.am index 9464ee5..957278b 100644 --- a/kftpgrabber/src/Makefile.am +++ b/kftpgrabber/src/Makefile.am @@ -47,7 +47,7 @@ kftpgrabber_LDADD = \ misc/interfaces/libkftpinterfaces.la \ misc/libs/ssh/libssh.a \ $(LIB_KDNSSD) -lkwalletclient $(LIBSSL) $(LIB_KPARTS) \ - $(LIB_KIO) $(LIB_KDEUI) + $(LIB_KIO) $(LIB_KDEUI) -lz # this is where the desktop file will go xdg_apps_DATA = kftpgrabber.desktop diff --git a/kftpgrabber/src/engine/ftpsocket.cpp b/kftpgrabber/src/engine/ftpsocket.cpp index 2741f4d..b0cb9ae 100644 --- a/kftpgrabber/src/engine/ftpsocket.cpp +++ b/kftpgrabber/src/engine/ftpsocket.cpp @@ -758,7 +758,7 @@ public: } // 229 Entering Extended Passive Mode (|||55016|) - char *begin = strchr(socket()->getResponse().ascii(), '('); + const char *begin = strchr(socket()->getResponse().ascii(), '('); int port; if (!begin || sscanf(begin, "(|||%d|)", &port) != 1) { @@ -793,12 +793,14 @@ public: // Ok PASV command successfull - let's parse the result int ip[6]; - char *begin = strchr(socket()->getResponse().ascii(), '('); + const char *begin = strchr(socket()->getResponse().ascii(), '('); // Some stinky servers don't respect RFC and do it on their own - if (!begin) - begin = strchr(socket()->getResponse().ascii(), '='); - + if (!begin) { + delete &begin; + const char *begin = strchr(socket()->getResponse().ascii(), '='); + } + if (!begin || (sscanf(begin, "(%d,%d,%d,%d,%d,%d)",&ip[0], &ip[1], &ip[2], &ip[3], &ip[4], &ip[5]) != 6 && sscanf(begin, "=%d,%d,%d,%d,%d,%d",&ip[0], &ip[1], &ip[2], &ip[3], &ip[4], &ip[5]) != 6)) { // Unable to parse, try the next thing diff --git a/kftpgrabber/src/engine/ssl.cpp b/kftpgrabber/src/engine/ssl.cpp index 92418bb..c0a0109 100644 --- a/kftpgrabber/src/engine/ssl.cpp +++ b/kftpgrabber/src/engine/ssl.cpp @@ -169,7 +169,11 @@ bool Ssl::setClientCertificate(KSSLPKCS12 *pkcs) void Ssl::setConnectionInfo() { +#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10000000) + const SSL_CIPHER *cipher; +#else SSL_CIPHER *cipher; +#endif char buffer[1024]; buffer[0] = 0; diff --git a/kftpgrabber/src/misc/kftpgrabber.kcfg b/kftpgrabber/src/misc/kftpgrabber.kcfg index 80cc583..b7ee305 100644 --- a/kftpgrabber/src/misc/kftpgrabber.kcfg +++ b/kftpgrabber/src/misc/kftpgrabber.kcfg @@ -95,7 +95,7 @@ </entry> <entry name="defEncoding" type="String"> - <default>iso 8859-1</default> + <default>utf8</default> <label>The default site encoding.</label> </entry> diff --git a/kftpgrabber/src/misc/libs/ssh/wrapper.c b/kftpgrabber/src/misc/libs/ssh/wrapper.c index b99beeb..c47d4cc 100644 --- a/kftpgrabber/src/misc/libs/ssh/wrapper.c +++ b/kftpgrabber/src/misc/libs/ssh/wrapper.c @@ -80,7 +80,7 @@ HMACCTX *hmac_init(const void *key, int len,int type){ HMAC_CTX *ctx; ctx=malloc(sizeof(HMAC_CTX)); #ifndef OLD_CRYPTO - HMAC_CTX_init(ctx); // openssl 0.9.7 requires it. + HMAC_CTX_init(ctx); #endif switch(type){ case HMAC_SHA1: |