mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-23 02:55:20 +00:00
Make use of CRT acquire/release in x509_serial_is_revoked()
This commit is contained in:
parent
e9718b451a
commit
79ae5b68e7
|
@ -2228,9 +2228,18 @@ static int x509_serial_is_revoked( unsigned char const *serial,
|
|||
int mbedtls_x509_crt_is_revoked( const mbedtls_x509_crt *crt,
|
||||
const mbedtls_x509_crl *crl )
|
||||
{
|
||||
return( x509_serial_is_revoked( crt->serial.p,
|
||||
crt->serial.len,
|
||||
crl ) );
|
||||
int ret;
|
||||
mbedtls_x509_crt_frame *frame;
|
||||
|
||||
ret = x509_crt_frame_acquire( crt, &frame );
|
||||
if( ret != 0 )
|
||||
return( MBEDTLS_ERR_X509_FATAL_ERROR );
|
||||
|
||||
ret = x509_serial_is_revoked( frame->serial.p,
|
||||
frame->serial.len,
|
||||
crl );
|
||||
x509_crt_frame_release( crt, frame );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue