mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 13:15:30 +00:00
- Clean Subject Alternative Name data
This commit is contained in:
parent
57b12982b3
commit
8afa70dcd5
|
@ -497,6 +497,10 @@ static int x509_get_sig( unsigned char **p,
|
|||
int ret;
|
||||
size_t len;
|
||||
|
||||
if( ( end - *p ) < 1 )
|
||||
return( POLARSSL_ERR_X509_CERT_INVALID_SIGNATURE +
|
||||
POLARSSL_ERR_ASN1_OUT_OF_DATA );
|
||||
|
||||
sig->tag = **p;
|
||||
|
||||
if( ( ret = asn1_get_tag( p, end, &len, ASN1_BIT_STRING ) ) != 0 )
|
||||
|
@ -3215,6 +3219,15 @@ void x509_free( x509_cert *crt )
|
|||
free( seq_prv );
|
||||
}
|
||||
|
||||
seq_cur = cert_cur->subject_alt_names.next;
|
||||
while( seq_cur != NULL )
|
||||
{
|
||||
seq_prv = seq_cur;
|
||||
seq_cur = seq_cur->next;
|
||||
memset( seq_prv, 0, sizeof( x509_sequence ) );
|
||||
free( seq_prv );
|
||||
}
|
||||
|
||||
if( cert_cur->raw.p != NULL )
|
||||
{
|
||||
memset( cert_cur->raw.p, 0, cert_cur->raw.len );
|
||||
|
|
Loading…
Reference in a new issue