Skip to content

Commit a0cd18d

Browse files
committed
Add back a removed comment and give RFC reference.
1 parent 1dff767 commit a0cd18d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

wolfcrypt/src/asn.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40565,7 +40565,10 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, word32 idx,
4056540565
/* Length of extension data. */
4056640566
int length = (int)dataASN[CERTEXTASN_IDX_VAL].length;
4056740567

40568-
/* Check for duplicate extension */
40568+
/* Check for duplicate extension. RFC 5280 Section 4.2 states that
40569+
* a certificate must not include more than one instance of a
40570+
* particular extension. Note that the same guidance does not appear
40571+
* for CRLs but the same reasoning should apply. */
4056940572
if ((oid == AUTH_KEY_OID && seenAuthKey) ||
4057040573
(oid == CRL_NUMBER_OID && seenCrlNum)) {
4057140574
WOLFSSL_MSG("Duplicate CRL extension found");
@@ -40628,6 +40631,7 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, word32 idx,
4062840631
FREE_MP_INT_SIZE(m, NULL, DYNAMIC_TYPE_TMP_BUFFER);
4062940632
}
4063040633
}
40634+
/* TODO: check criticality */
4063140635
/* Move index on to next extension. */
4063240636
idx += (word32)length;
4063340637
}

0 commit comments

Comments
 (0)