mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Forbid repeated X.509 extensions
This commit is contained in:
parent
d681443f69
commit
8a5e3d4a40
3 changed files with 9 additions and 0 deletions
|
|
@ -481,6 +481,10 @@ static int x509_get_crt_ext( unsigned char **p,
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Forbid repeated extensions */
|
||||
if( ( crt->ext_types & ext_type ) != 0 )
|
||||
return( POLARSSL_ERR_X509_INVALID_EXTENSIONS );
|
||||
|
||||
crt->ext_types |= ext_type;
|
||||
|
||||
switch( ext_type )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue