diff options
author | Johannes Winkelmann <jw@smts.ch> | 2008-06-24 13:08:18 +0200 |
---|---|---|
committer | Johannes Winkelmann <jw@smts.ch> | 2008-06-24 13:08:18 +0200 |
commit | 793172710a2f05f081deb50c465f6f50a38c1a76 (patch) | |
tree | 41723d4d29c00ea8412b600528f899f174864f9b | |
parent | f5ad3c4fc8e060c8feadb9ed0fee28eab2ec2f51 (diff) | |
download | httpup-793172710a2f05f081deb50c465f6f50a38c1a76.tar.gz httpup-793172710a2f05f081deb50c465f6f50a38c1a76.tar.xz |
- add -k / --insecure-ssl
- update man page and ChangeLog
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | httpup.8 | 4 | ||||
-rw-r--r-- | httpup.cpp | 4 | ||||
-rw-r--r-- | httpupargparser.cpp | 9 | ||||
-rw-r--r-- | httpupargparser.h | 1 |
6 files changed, 22 insertions, 3 deletions
@@ -1,3 +1,8 @@ +* 0.4.0j 24.06.2008 Johannes Winkelmann +- add gcc 4.3 fixes by Fredrik Rinnestam +- add "[options]" to man page ] +- add --insecure-ssl/-k option ] Suggested by Jose Beneyto + * 0.4.0i 15.04.2006 Johannes Winkelmann - Remove directories again (regression from 4.0h) - improve some compilation issues reported by Han @@ -1,5 +1,5 @@ name=httpup -version=0.4.0i +version=0.4.0j-pre prefix= /usr/local bindir= $(prefix)/bin @@ -8,7 +8,7 @@ httpup \- an md5sum based one way synchronisation tool for http file repositories .SH "SYNOPSIS" -.B httpup <command> URL target +.B httpup [options] <command> URL target .SH "DESCRIPTION" httpup performs a one way synchronisation of files published over @@ -49,6 +49,8 @@ Alternative name for the remote REPO file .B --encode, -e: URL encode filenames +.B --insecure-ssl, -k +Ignore SSL certificates when downloading from an HTTPS host .SH "CONFIGURATION" In order to specify proxy server and proxy authentication information, httpup @@ -231,6 +231,10 @@ int HttpUp::exec(ExecType type) curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer); curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + if (m_argParser.isSet(HttpupArgparser::OPT_INSECURE_SSL)) { + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); + } + long timeout = DEFAULT_TIMEOUT; if (config.operationTimeout != "") { diff --git a/httpupargparser.cpp b/httpupargparser.cpp index d52c883..573d293 100644 --- a/httpupargparser.cpp +++ b/httpupargparser.cpp @@ -19,6 +19,7 @@ ArgParser::APCmd HttpupArgparser::CMD_LIST; ArgParser::APOpt HttpupArgparser::OPT_REPOFILE; ArgParser::APOpt HttpupArgparser::OPT_ENCODE; ArgParser::APOpt HttpupArgparser::OPT_VERIFY_MD5; +ArgParser::APOpt HttpupArgparser::OPT_INSECURE_SSL; HttpupArgparser::HttpupArgparser() @@ -42,9 +43,13 @@ HttpupArgparser::HttpupArgparser() 'm', "verify md5sum of downloaded files"); + OPT_INSECURE_SSL.init("insecure-ssl", + 'k', + "Don't verify the SSL certificate of the server"); addOption(CMD_SYNC, OPT_REPOFILE, false); addOption(CMD_SYNC, OPT_ENCODE, false); addOption(CMD_SYNC, OPT_VERIFY_MD5, false); + addOption(CMD_SYNC, OPT_INSECURE_SSL, false); // - copy @@ -53,11 +58,13 @@ HttpupArgparser::HttpupArgparser() ArgParser::EQ, 2, "<url> <target dir>"); addOption(CMD_COPY, OPT_REPOFILE, false); addOption(CMD_COPY, OPT_ENCODE, false); - addOption(CMD_SYNC, OPT_VERIFY_MD5, false); + addOption(CMD_COPY, OPT_VERIFY_MD5, false); + addOption(CMD_COPY, OPT_INSECURE_SSL, false); // - list addCommand(CMD_LIST, "list", "list files in <directory> which are controlled by httpup", ArgParser::MAX, 1, "<directory>"); addOption(CMD_LIST, OPT_REPOFILE, false); + addOption(CMD_LIST, OPT_INSECURE_SSL, false); } diff --git a/httpupargparser.h b/httpupargparser.h index ede9b42..63717bb 100644 --- a/httpupargparser.h +++ b/httpupargparser.h @@ -31,6 +31,7 @@ public: static ArgParser::APOpt OPT_REPOFILE; static ArgParser::APOpt OPT_ENCODE; static ArgParser::APOpt OPT_VERIFY_MD5; + static ArgParser::APOpt OPT_INSECURE_SSL; std::string getAppIdentification() const { return std::string("httpup ") + MF_VERSION + "\n"; } |