mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
mbedtls_x509_crt_ext_cb_t definition changed
As suggested in https://github.com/ARMmbed/mbedtls/pull/3243#discussion_r431238005 Co-authored-by: Gilles Peskine <gilles.peskine@arm.com> Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com>
This commit is contained in:
@ -957,8 +957,13 @@ static int x509_get_crt_ext( unsigned char **p,
|
||||
if( ret != 0 )
|
||||
{
|
||||
/* Give the callback (if any) a chance to handle the extension */
|
||||
if( cb != NULL && cb( crt, &extn_oid, is_critical, p, end_ext_octet ) == 0 )
|
||||
if( cb != NULL ) {
|
||||
ret = cb( crt, &extn_oid, is_critical, *p, end_ext_octet );
|
||||
if ( ret != 0 )
|
||||
return ( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + ret );
|
||||
*p = end_ext_octet;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* No parser found, skip extension */
|
||||
*p = end_ext_octet;
|
||||
|
Reference in New Issue
Block a user