Updates from code review

This commit is contained in:
Martin Akman
2020-03-31 18:25:59 +10:00
parent 3bbd8be5c9
commit 568ce62b81
2 changed files with 14 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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