From 635f4b4cf93daebbe19260db2f9c60c45b8d0d5b Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Mon, 20 Jul 2009 20:34:41 +0000 Subject: [PATCH] - Updated error check on optional nextUpdate in CRL --- library/x509parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/x509parse.c b/library/x509parse.c index 38824b0da..506be47d9 100644 --- a/library/x509parse.c +++ b/library/x509parse.c @@ -1323,7 +1323,9 @@ int x509parse_crl( x509_crl *chain, unsigned char *buf, int buflen ) if( ( ret = x509_get_UTCTime( &p, end, &crl->next_update ) ) != 0 ) { - if ( ret != POLARSSL_ERR_ASN1_UNEXPECTED_TAG ) { + if ( ret != ( POLARSSL_ERR_X509_CERT_INVALID_DATE | + POLARSSL_ERR_ASN1_UNEXPECTED_TAG ) ) + { x509_crl_free( crl ); return( ret ); }