The unified diff between revisions [3eb59b4f..] 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 [c67221f8e480d86536ef363fb7680f9b53c1dc31]
#    to [b885de41c4d7fef9b57d9a6468103d7642358a19]
#
============================================================
--- src/x509stor.cpp	c67221f8e480d86536ef363fb7680f9b53c1dc31
+++ src/x509stor.cpp	b885de41c4d7fef9b57d9a6468103d7642358a19
@@ -1,6 +1,6 @@
 /*************************************************
 * X.509 Certificate Store Source File            *
-* (C) 1999-2008 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,