diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index e96e693a3..bba9aed5b 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -6154,6 +6154,14 @@ int ExtractDate(const unsigned char* date, unsigned char format, if (GetTime(&tm_min , date, idx) != 0) return 0; if (GetTime(&tm_sec , date, idx) != 0) return 0; + /* Re-populate certTime with computed values */ + certTime->tm_year = tm_year; + certTime->tm_mon = tm_mon; + certTime->tm_mday = tm_mday; + certTime->tm_hour = tm_hour; + certTime->tm_min = tm_min; + certTime->tm_sec = tm_sec; + return 1; } diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 67cd9009a..27088cd00 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -882,8 +882,14 @@ extern void uITRON4_free(void *p) ; #define TFM_TIMING_RESISTANT #endif +/* To support storing some of the large constant tables in flash memory rather than SRAM. + Useful for processors that have limited SRAM, such as the AVR family of microtrollers. */ #ifdef WOLFSSL_USE_FLASHMEM + /* This is supported on the avr-gcc compiler, for more information see: + https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html */ #define FLASH_QUALIFIER __flash + + /* Copy data out of flash memory and into SRAM */ #define XMEMCPY_P(pdest, psrc, size) memcpy_P((pdest), (psrc), (size)) #else #define FLASH_QUALIFIER