Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions wolfcrypt/src/asn.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ ASN Options:
* WOLFSSL_NO_OCSP_DATE_CHECK: Disable date checks for OCSP responses. This
may be required when the system's real-time clock is not very accurate.
It is recommended to enforce the nonce check instead if possible.
If you are enabling WOLFSSL_NO_OCSP_DATE_CHECK because of an
inaccurate clock you can also consider WOLFSSL_AFTER_DATE_CLOCK_SKEW/
WOLFSSL_BEFORE_DATE_CLOCK_SKEW.
* WOLFSSL_NO_CRL_DATE_CHECK: Disable date checks for CRL's.
* WOLFSSL_NO_CRL_NEXT_DATE: Do not fail if CRL next date is missing
* WOLFSSL_FORCE_OCSP_NONCE_CHECK: Require nonces to be available in OCSP
Expand Down Expand Up @@ -36012,6 +36015,8 @@ static int DecodeSingleResponse(const byte* source, word32* ioIndex,
/* Store the thisDate format - only one possible. */
cs->thisDateFormat = ASN_GENERALIZED_TIME;
#if !defined(NO_ASN_TIME_CHECK) && !defined(WOLFSSL_NO_OCSP_DATE_CHECK)
/* If you are enabling WOLFSSL_NO_OCSP_DATE_CHECK because of an
* inaccurate clock consider WOLFSSL_BEFORE_DATE_CLOCK_SKEW. */
/* Check date is a valid string and ASN_BEFORE now. */
if ((! AsnSkipDateCheck) &&
!XVALIDATE_DATE(cs->thisDate, ASN_GENERALIZED_TIME, ASN_BEFORE,
Expand All @@ -36038,6 +36043,8 @@ static int DecodeSingleResponse(const byte* source, word32* ioIndex,
/* Store the nextDate format - only one possible. */
cs->nextDateFormat = ASN_GENERALIZED_TIME;
#if !defined(NO_ASN_TIME_CHECK) && !defined(WOLFSSL_NO_OCSP_DATE_CHECK)
/* If you are enabling WOLFSSL_NO_OCSP_DATE_CHECK because of an
* inaccurate clock consider WOLFSSL_AFTER_DATE_CLOCK_SKEW. */
/* Check date is a valid string and ASN_AFTER now. */
if ((! AsnSkipDateCheck) &&
!XVALIDATE_DATE(cs->nextDate, ASN_GENERALIZED_TIME, ASN_AFTER,
Expand Down
4 changes: 4 additions & 0 deletions wolfcrypt/src/asn_orig.c
Original file line number Diff line number Diff line change
Expand Up @@ -8453,6 +8453,8 @@ static int DecodeSingleResponse(byte* source, word32* ioIndex, word32 size,

#ifndef NO_ASN_TIME_CHECK
#ifndef WOLFSSL_NO_OCSP_DATE_CHECK
/* If you are enabling WOLFSSL_NO_OCSP_DATE_CHECK because of an inaccurate
* clock consider WOLFSSL_BEFORE_DATE_CLOCK_SKEW. */
if ((! AsnSkipDateCheck) && !XVALIDATE_DATE(single->status->thisDate,
single->status->thisDateFormat, ASN_BEFORE, MAX_DATE_SIZE))
return ASN_BEFORE_DATE_E;
Expand Down Expand Up @@ -8490,6 +8492,8 @@ static int DecodeSingleResponse(byte* source, word32* ioIndex, word32 size,

#ifndef NO_ASN_TIME_CHECK
#ifndef WOLFSSL_NO_OCSP_DATE_CHECK
/* If you are enabling WOLFSSL_NO_OCSP_DATE_CHECK because of an
* inaccurate clock consider WOLFSSL_AFTER_DATE_CLOCK_SKEW. */
if ((! AsnSkipDateCheck) &&
!XVALIDATE_DATE(single->status->nextDate,
single->status->nextDateFormat, ASN_AFTER, MAX_DATE_SIZE))
Expand Down
Loading