Skip to content

Commit 434526c

Browse files
committed
Expand WOLFSSL_NO_CRL_DATE_CHECK to the process cert CRL next date check. Fix typo for DEBUG_CRYPTOCB. Add comments for wc_ValidateDate arguments. Improve linker script example for FIPS to put stdlib before FIPS and not force KEEP.
1 parent 2c9208b commit 434526c

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

IDE/GCC-ARM/linker_fips.ld

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,23 @@ SECTIONS
5454
. = ALIGN(4);
5555
} > FLASH
5656

57-
/* Custom section for wolfCrypt and LibC to prevent FIPS hash from changing
57+
/* Custom section for wolfCrypt and LibC to prevent FIPS hash from changing
5858
when application code changes are made */
5959
.wolfCryptNonFIPS_text :
6060
{
6161
. = ALIGN(4);
62-
KEEP(*wolf*src*.o(.text .text*))
6362
lib_a* ( .text .text*)
63+
*wolf*src*.o(.text .text*)
6464
. = ALIGN(4);
6565
} > FLASH
6666
.wolfCryptNonFIPS_rodata :
6767
{
6868
. = ALIGN(4);
69-
KEEP(*wolf*src*.o(.rodata .rodata*))
7069
lib_a* (.rodata .rodata*)
70+
*wolf*src*.o(.rodata .rodata*)
7171
. = ALIGN(4);
7272
} > FLASH
73-
73+
7474
.sys : { *(.sys*) } > FLASH
7575
.text : { *(.text*) } > FLASH
7676
.rodata : { *(.text*) } > FLASH

src/crl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static int CheckCertCRLList(WOLFSSL_CRL* crl, byte* issuerHash, byte* serial,
393393
if (crle->nextDateFormat != ASN_OTHER_TYPE)
394394
#endif
395395
{
396-
#ifndef NO_ASN_TIME
396+
#if !defined(NO_ASN_TIME) && !defined(WOLFSSL_NO_CRL_DATE_CHECK)
397397
if (!XVALIDATE_DATE(crle->nextDate,crle->nextDateFormat, AFTER)) {
398398
WOLFSSL_MSG("CRL next date is no longer valid");
399399
ret = ASN_AFTER_DATE_E;

wolfcrypt/src/asn.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14707,6 +14707,9 @@ static WC_INLINE int DateLessThan(const struct tm* a, const struct tm* b)
1470714707

1470814708
/* like atoi but only use first byte */
1470914709
/* Make sure before and after dates are valid */
14710+
/* date = ASN.1 raw */
14711+
/* format = ASN_UTC_TIME or ASN_GENERALIZED_TIME */
14712+
/* dateType = AFTER or BEFORE */
1471014713
int wc_ValidateDate(const byte* date, byte format, int dateType)
1471114714
{
1471214715
time_t ltime;

wolfcrypt/src/cryptocb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* WOLF_CRYPTO_CB_CMD
3434
*
3535
* enable debug InfoString functions
36-
* DEBUG_CRYPTO_CB
36+
* DEBUG_CRYPTOCB
3737
*/
3838

3939
#ifdef HAVE_CONFIG_H

0 commit comments

Comments
 (0)