mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-24 10:35:12 +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,
|
int mbedtls_x509_crt_is_revoked( const mbedtls_x509_crt *crt,
|
||||||
const mbedtls_x509_crl *crl )
|
const mbedtls_x509_crl *crl )
|
||||||
{
|
{
|
||||||
return( x509_serial_is_revoked( crt->serial.p,
|
int ret;
|
||||||
crt->serial.len,
|
mbedtls_x509_crt_frame *frame;
|
||||||
crl ) );
|
|
||||||
|
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