Merge pull request #7046 from dgarske/crl_cleanups

Various cleanups - CRL and comments - 20231207
This commit is contained in:
JacobBarthelmeh
2023-12-08 17:15:01 -07:00
committed by GitHub
4 changed files with 9 additions and 6 deletions

View File

@ -59,15 +59,15 @@ SECTIONS
.wolfCryptNonFIPS_text : .wolfCryptNonFIPS_text :
{ {
. = ALIGN(4); . = ALIGN(4);
KEEP(*wolf*src*.o(.text .text*))
lib_a* ( .text .text*) lib_a* ( .text .text*)
*wolf*src*.o(.text .text*)
. = ALIGN(4); . = ALIGN(4);
} > FLASH } > FLASH
.wolfCryptNonFIPS_rodata : .wolfCryptNonFIPS_rodata :
{ {
. = ALIGN(4); . = ALIGN(4);
KEEP(*wolf*src*.o(.rodata .rodata*))
lib_a* (.rodata .rodata*) lib_a* (.rodata .rodata*)
*wolf*src*.o(.rodata .rodata*)
. = ALIGN(4); . = ALIGN(4);
} > FLASH } > FLASH

View File

@ -393,7 +393,7 @@ static int CheckCertCRLList(WOLFSSL_CRL* crl, byte* issuerHash, byte* serial,
if (crle->nextDateFormat != ASN_OTHER_TYPE) if (crle->nextDateFormat != ASN_OTHER_TYPE)
#endif #endif
{ {
#ifndef NO_ASN_TIME #if !defined(NO_ASN_TIME) && !defined(WOLFSSL_NO_CRL_DATE_CHECK)
if (!XVALIDATE_DATE(crle->nextDate,crle->nextDateFormat, AFTER)) { if (!XVALIDATE_DATE(crle->nextDate,crle->nextDateFormat, AFTER)) {
WOLFSSL_MSG("CRL next date is no longer valid"); WOLFSSL_MSG("CRL next date is no longer valid");
ret = ASN_AFTER_DATE_E; ret = ASN_AFTER_DATE_E;

View File

@ -14707,6 +14707,9 @@ static WC_INLINE int DateLessThan(const struct tm* a, const struct tm* b)
/* like atoi but only use first byte */ /* like atoi but only use first byte */
/* Make sure before and after dates are valid */ /* Make sure before and after dates are valid */
/* date = ASN.1 raw */
/* format = ASN_UTC_TIME or ASN_GENERALIZED_TIME */
/* dateType = AFTER or BEFORE */
int wc_ValidateDate(const byte* date, byte format, int dateType) int wc_ValidateDate(const byte* date, byte format, int dateType)
{ {
time_t ltime; time_t ltime;

View File

@ -33,7 +33,7 @@
* WOLF_CRYPTO_CB_CMD * WOLF_CRYPTO_CB_CMD
* *
* enable debug InfoString functions * enable debug InfoString functions
* DEBUG_CRYPTO_CB * DEBUG_CRYPTOCB
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H