mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-14 20:01:00 +03:00
Always revoke certificate on CRL
RFC5280 does not state that the `revocationDate` should be checked. In addition, when no time source is available (i.e., when MBEDTLS_HAVE_TIME_DATE is not defined), `mbedtls_x509_time_is_past` always returns 0. This results in the CRL not being checked at all. https://tools.ietf.org/html/rfc5280 Signed-off-by: Raoul Strackx <raoul.strackx@fortanix.com>
This commit is contained in:
@ -2324,8 +2324,7 @@ int mbedtls_x509_crt_is_revoked( const mbedtls_x509_crt *crt, const mbedtls_x509
|
||||
if( crt->serial.len == cur->serial.len &&
|
||||
memcmp( crt->serial.p, cur->serial.p, crt->serial.len ) == 0 )
|
||||
{
|
||||
if( mbedtls_x509_time_is_past( &cur->revocation_date ) )
|
||||
return( 1 );
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
cur = cur->next;
|
||||
|
Reference in New Issue
Block a user