Simplify X.509 CRT version check in UID parsing

WHen parsing the CRT version, we already check that
version is either 1, 2, or 3, so checking whether
version == 2 or version == 3 is equivalent to
version != 1.
This commit is contained in:
Hanno Becker 2019-06-08 07:38:20 +01:00
parent 60785d113b
commit 97aa4363e1

View file

@ -1295,7 +1295,7 @@ static int x509_crt_parse_frame( unsigned char *start,
p += len;
frame->pubkey_raw.len = p - frame->pubkey_raw.p;
if( frame->version == 2 || frame->version == 3 )
if( frame->version != 1 )
{
/*
* issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,