mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-28 19:13:28 +00:00
Skip uncritical unsupported extensions
Skip extensions that have support in the `oid` layer`, but no parser found in the x509 layer, in case these are not critical.
This commit is contained in:
parent
57773d4ede
commit
df48efa77a
@ -820,7 +820,17 @@ static int x509_get_crt_ext( unsigned char **p,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
/*
|
||||||
|
* If this is a non-critical extension, which the oid layer
|
||||||
|
* supports, but there isn't an x509 parser for it,
|
||||||
|
* skip the extension.
|
||||||
|
*/
|
||||||
|
#if !defined(MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION)
|
||||||
|
if( is_critical )
|
||||||
return( MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE );
|
return( MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE );
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
*p = end_ext_octet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user