mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-04-28 15:56:25 +00:00
Remove redundant CRT version check during CRT parsing
This commit is contained in:
parent
938a80507a
commit
fd64f14ef9
|
@ -1297,26 +1297,25 @@ static int x509_crt_parse_frame( unsigned char *start,
|
||||||
p += len;
|
p += len;
|
||||||
frame->pubkey_raw.len = p - frame->pubkey_raw.p;
|
frame->pubkey_raw.len = p - frame->pubkey_raw.p;
|
||||||
|
|
||||||
/*
|
|
||||||
* issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
|
|
||||||
* -- If present, version shall be v2 or v3
|
|
||||||
*/
|
|
||||||
if( frame->version == 2 || frame->version == 3 )
|
if( frame->version == 2 || frame->version == 3 )
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
|
||||||
|
* -- If present, version shall be v2 or v3
|
||||||
|
*/
|
||||||
|
|
||||||
ret = x509_get_uid( &p, end, &tmp, 1 /* implicit tag */ );
|
ret = x509_get_uid( &p, end, &tmp, 1 /* implicit tag */ );
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
||||||
frame->issuer_id.p = tmp.p;
|
frame->issuer_id.p = tmp.p;
|
||||||
frame->issuer_id.len = tmp.len;
|
frame->issuer_id.len = tmp.len;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
|
* subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
|
||||||
* -- If present, version shall be v2 or v3
|
* -- If present, version shall be v2 or v3
|
||||||
*/
|
*/
|
||||||
if( frame->version == 2 || frame->version == 3 )
|
|
||||||
{
|
|
||||||
ret = x509_get_uid( &p, end, &tmp, 2 /* implicit tag */ );
|
ret = x509_get_uid( &p, end, &tmp, 2 /* implicit tag */ );
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
Loading…
Reference in a new issue