diff common/selftest.c @ 1364:28885e8c891f

(issue177) Read signature time from PKCS#7 object in selftest and binverify
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 21 Nov 2014 18:33:31 +0100
parents a974b61a5cce
children
line wrap: on
line diff
--- a/common/selftest.c	Fri Nov 21 18:32:35 2014 +0100
+++ b/common/selftest.c	Fri Nov 21 18:33:31 2014 +0100
@@ -12,7 +12,7 @@
 #include "logging.h"
 
 bool
-selftest()
+selftest(time_t *sig_time)
 {
   bin_verify_result res;
 #ifdef WIN32
@@ -45,6 +45,10 @@
       return false;
     }
 
+  if (sig_time)
+    {
+      *sig_time = res.sig_time;
+    }
   fclose(res.fptr);
   xfree(utf8path);
   return true;
@@ -55,6 +59,10 @@
       syslog_error_printf ("Integrity check failed.");
       return false;
     }
+  if (sig_time)
+    {
+      *sig_time = res.sig_time;
+    }
   fclose(res.fptr);
   return true;
 #endif

http://wald.intevation.org/projects/trustbridge/