mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-24 07:16:54 +00:00
test_suite_x509parse.function improvement
as suggested in https://github.com/ARMmbed/mbedtls/pull/3419#discussion_r441433697 also removed two no longer necessary void casts Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com>
This commit is contained in:
parent
c84b1e6aa0
commit
b77fad8ebe
|
@ -306,8 +306,6 @@ int parse_crt_ext_cb( void *p_ctx, mbedtls_x509_crt const *crt, mbedtls_x509_buf
|
||||||
int critical, const unsigned char *cp, const unsigned char *end )
|
int critical, const unsigned char *cp, const unsigned char *end )
|
||||||
{
|
{
|
||||||
( void ) crt;
|
( void ) crt;
|
||||||
( void ) cp;
|
|
||||||
( void ) end;
|
|
||||||
( void ) critical;
|
( void ) critical;
|
||||||
mbedtls_x509_buf *new_oid = (mbedtls_x509_buf *)p_ctx;
|
mbedtls_x509_buf *new_oid = (mbedtls_x509_buf *)p_ctx;
|
||||||
if( oid->tag == MBEDTLS_ASN1_OID &&
|
if( oid->tag == MBEDTLS_ASN1_OID &&
|
||||||
|
@ -352,6 +350,9 @@ int parse_crt_ext_cb( void *p_ctx, mbedtls_x509_crt const *crt, mbedtls_x509_buf
|
||||||
MBEDTLS_ASN1_OID ) ) != 0 )
|
MBEDTLS_ASN1_OID ) ) != 0 )
|
||||||
return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret );
|
return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Recognize exclusively the policy with OID 1
|
||||||
|
*/
|
||||||
if( len != 1 || *p[0] != 1 )
|
if( len != 1 || *p[0] != 1 )
|
||||||
parse_ret = MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE;
|
parse_ret = MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue