From 748c5ac128f44bc2a0389df1f5f52c7732f63cf3 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 31 Mar 2015 16:23:28 -0700 Subject: [PATCH 1/2] update configure help strings for AESGCM and DH --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index aad5ab921..6b1fdad77 100644 --- a/configure.ac +++ b/configure.ac @@ -335,7 +335,7 @@ AM_CONDITIONAL([BUILD_SNIFFTEST], [ test "x$ENABLED_SNIFFTEST" = "xyes" ]) # AES-GCM AC_ARG_ENABLE([aesgcm], - [ --enable-aesgcm Enable wolfSSL AES-GCM support (default: disabled)], + [AS_HELP_STRING([--enable-aesgcm],[Enable wolfSSL AES-GCM support (default: enabled)])], [ ENABLED_AESGCM=$enableval ], [ ENABLED_AESGCM=yes ] ) @@ -884,7 +884,7 @@ AM_CONDITIONAL([BUILD_RSA], [test "x$ENABLED_RSA" = "xyes"]) # DH AC_ARG_ENABLE([dh], - [ --enable-dh Enable DH (default: disabled)], + [AS_HELP_STRING([--enable-dh],[Enable DH (default: enabled)])], [ ENABLED_DH=$enableval ], [ ENABLED_DH=yes ] ) From 1d4187e168e8534341b4268a0a62b2fbef4acce0 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 1 Apr 2015 10:02:02 -0600 Subject: [PATCH 2/2] add local struct tm for XGMTIME with TIME_OVERRIDES, fixes issue #55 --- wolfcrypt/src/asn.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index a79e85062..6c61fbf2a 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -2363,12 +2363,12 @@ int ValidateDate(const byte* date, byte format, int dateType) time_t ltime; struct tm certTime; struct tm* localTime; - struct tm* tmpTime; + struct tm* tmpTime = NULL; int i = 0; -#ifdef FREESCALE_MQX - struct tm mqxTime; - tmpTime = &mqxTime; +#if defined(FREESCALE_MQX) || defined(TIME_OVERRIDES) + struct tm tmpTimeStorage; + tmpTime = &tmpTimeStorage; #else (void)tmpTime; #endif @@ -2394,9 +2394,9 @@ int ValidateDate(const byte* date, byte format, int dateType) GetTime((int*)&certTime.tm_hour, date, &i); GetTime((int*)&certTime.tm_min, date, &i); GetTime((int*)&certTime.tm_sec, date, &i); - + if (date[i] != 'Z') { /* only Zulu supported for this profile */ - WOLFSSL_MSG("Only Zulu time supported for this profile"); + WOLFSSL_MSG("Only Zulu time supported for this profile"); return 0; } @@ -5217,13 +5217,13 @@ static int SetValidity(byte* output, int daysValid) time_t ticks; time_t normalTime; struct tm* now; - struct tm* tmpTime; + struct tm* tmpTime = NULL; struct tm local; -#ifdef FREESCALE_MQX - /* for use with MQX gmtime_r */ - struct tm mqxTime; - tmpTime = &mqxTime; +#if defined(FREESCALE_MQX) || defined(TIME_OVERRIDES) + /* for use with gmtime_r */ + struct tm tmpTimeStorage; + tmpTime = &tmpTimeStorage; #else (void)tmpTime; #endif