The unified diff between revisions [92f17752..] and [5a1d14c4..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'src/x509stor.cpp'
#
#
# patch "src/x509stor.cpp"
# from [4f299706a62a445d1d9d2671e9da3ec5db9f5e0f]
# to [b885de41c4d7fef9b57d9a6468103d7642358a19]
#
============================================================
--- src/x509stor.cpp 4f299706a62a445d1d9d2671e9da3ec5db9f5e0f
+++ src/x509stor.cpp b885de41c4d7fef9b57d9a6468103d7642358a19
@@ -1,6 +1,6 @@
/*************************************************
* X.509 Certificate Store Source File *
-* (C) 1999-2006 The Botan Project *
+* (C) 1999-2007 Jack Lloyd *
*************************************************/
#include <botan/x509stor.h>
@@ -18,6 +18,24 @@ namespace {
namespace {
/*************************************************
+* Do a validity check *
+*************************************************/
+s32bit validity_check(const X509_Time& start, const X509_Time& end,
+ u64bit current_time)
+ {
+ const u32bit ALLOWABLE_SLIP =
+ global_config().option_as_time("x509/validity_slack");
+
+ const s32bit NOT_YET_VALID = -1, VALID_TIME = 0, EXPIRED = 1;
+
+ if(start.cmp(current_time + ALLOWABLE_SLIP) > 0)
+ return NOT_YET_VALID;
+ if(end.cmp(current_time - ALLOWABLE_SLIP) < 0)
+ return EXPIRED;
+ return VALID_TIME;
+ }
+
+/*************************************************
* Compare the value of unique ID fields *
*************************************************/
bool compare_ids(const MemoryVector<byte>& id1,