Also compiles / runs without time-based functions in OS
Can now run without need of time() / localtime() and gettimeofday()
diff --git a/library/x509parse.c b/library/x509parse.c
index b27faf9..ea3a24a 100644
--- a/library/x509parse.c
+++ b/library/x509parse.c
@@ -2875,6 +2875,7 @@
/*
* Return 0 if the x509_time is still valid, or 1 otherwise.
*/
+#if defined(POLARSSL_HAVE_TIME)
int x509parse_time_expired( const x509_time *to )
{
int year, mon, day;
@@ -2941,6 +2942,13 @@
return( 0 );
}
+#else /* POLARSSL_HAVE_TIME */
+int x509parse_time_expired( const x509_time *to )
+{
+ ((void) to);
+ return( 0 );
+}
+#endif /* POLARSSL_HAVE_TIME */
/*
* Return 1 if the certificate is revoked, or 0 otherwise.