- Fixed serial length check

This commit is contained in:
Paul Bakker 2011-01-16 21:38:35 +00:00
parent dd47699ba5
commit a056efc8f9

View File

@ -2596,7 +2596,8 @@ int x509parse_revoked( const x509_cert *crt, const x509_crl *crl )
while( cur != NULL && cur->serial.len != 0 )
{
if( memcmp( crt->serial.p, cur->serial.p, crt->serial.len ) == 0 )
if( crt->serial.len == cur->serial.len &&
memcmp( crt->serial.p, cur->serial.p, crt->serial.len ) == 0 )
{
if( x509parse_time_expired( &cur->revocation_date ) )
return( 1 );