1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-07 06:42:56 +03:00

Also compiles / runs without time-based functions in OS

Can now run without need of time() / localtime() and gettimeofday()
This commit is contained in:
Paul Bakker
2013-07-03 15:31:03 +02:00
parent ecd54fb897
commit fa9b10050b
13 changed files with 119 additions and 16 deletions

View File

@@ -2875,6 +2875,7 @@ int x509parse_crl_info( char *buf, size_t size, const char *prefix,
/*
* 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 @@ int x509parse_time_expired( const x509_time *to )
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.