summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/strutl.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-06-09 10:52:45 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-06-09 10:52:45 +0200
commit308b793694774eece8765d172b8e989d8ed29925 (patch)
treebad798009c7f2b857c060e299294f63eabc3b20f /apt-pkg/contrib/strutl.h
parent1aa9b2974d33015102224ffb738b2e8e0a4bcb42 (diff)
parentb02fffa64833e1f8e2617669d89de0a6d0882747 (diff)
- backport forgotten Valid-Until patch from the obsolete experimental
branch to prevent replay attacks better, thanks to Thomas Viehmann for the initial patch! (Closes: #499897) * doc/apt.conf.5.xml: - document the new Valid-Until related options * apt-pkg/contrib/strutl.cc: - split StrToTime() into HTTP1.1 and FTP date parser methods and use strptime() instead of some self-made scanf mangling - use the portable timegm shown in his manpage instead of a strange looking code copycat from wget * ftparchive/writer.cc: - add ValidTime option to generate a Valid-Until header in Release file
Diffstat (limited to 'apt-pkg/contrib/strutl.h')
-rw-r--r--apt-pkg/contrib/strutl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h
index e509145f9..a457ff047 100644
--- a/apt-pkg/contrib/strutl.h
+++ b/apt-pkg/contrib/strutl.h
@@ -45,7 +45,9 @@ string Base64Encode(const string &Str);
string OutputInDepth(const unsigned long Depth, const char* Separator=" ");
string URItoFileName(const string &URI);
string TimeRFC1123(time_t Date);
-bool StrToTime(const string &Val,time_t &Result);
+bool RFC1123StrToTime(const char* const str,time_t &time) __must_check;
+bool FTPMDTMStrToTime(const char* const str,time_t &time) __must_check;
+__deprecated bool StrToTime(const string &Val,time_t &Result);
string LookupTag(const string &Message,const char *Tag,const char *Default = 0);
int StringToBool(const string &Text,int Default = -1);
bool ReadMessages(int Fd, vector<string> &List);