diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 886238907..dd84bdbe4 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -14726,12 +14726,14 @@ int wc_ValidateDate(const byte* date, byte format, int dateType) (void)tmpTime; ltime = wc_Time(0); +#ifndef NO_TIME_SIGNED_CHECK if (sizeof(ltime) == sizeof(word32) && (int)ltime < 0){ /* A negative response here could be due to a 32-bit time_t * where the year is 2038 or later. */ WOLFSSL_MSG("wc_Time failed to return a valid value"); return 0; } +#endif #ifdef WOLFSSL_BEFORE_DATE_CLOCK_SKEW if (dateType == BEFORE) { diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 6b802e356..74ac22831 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -15427,7 +15427,7 @@ static int simple_mem_test(int sz) static wc_test_ret_t const_byte_ptr_test(const byte* in, word32 *outJ) { wc_test_ret_t ret = 0; - volatile word32 j = -1; /* must be volatile to properly detect error */ + volatile word32 j = -1UL; /* must be volatile to properly detect error */ ret = (wc_test_ret_t)*in; /* accessed *in value. */ (void)ret; diff --git a/wolfssl/test.h b/wolfssl/test.h index 6882cc0b9..757e69647 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -110,7 +110,9 @@ #elif defined(WOLFSSL_TIRTOS) #include #include - #include + #if !defined(__ti__) /* conflicts with sys/socket.h */ + #include + #endif #include #include #include @@ -1284,7 +1286,7 @@ static WC_INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer, int err; struct hostent* entry = gethostbyname(peer, &err); #elif defined(WOLFSSL_TIRTOS) - struct hostent* entry = DNSGetHostByName(peer); + struct hostent* entry = (struct hostent*)DNSGetHostByName(peer); #elif defined(WOLFSSL_VXWORKS) struct hostent* entry = (struct hostent*)hostGetByName((char*)peer); #else diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 37bbcdb3c..8203f7cef 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -986,6 +986,9 @@ extern void uITRON4_free(void *p) ; #define WOLFSSL_HAVE_SP_ECC #define SP_WORD_SIZE 32 #define WOLFSSL_HAVE_SP_RSA + #ifndef NO_DH + #define WOLFSSL_HAVE_SP_DH + #endif #define WOLFSSL_SP_4096 #endif #define TFM_TIMING_RESISTANT @@ -993,25 +996,37 @@ extern void uITRON4_free(void *p) ; #define WC_RSA_BLINDING #define NO_DEV_RANDOM #define NO_FILESYSTEM - #define NO_SIG_WRAPPER #define NO_MAIN_DRIVER - #define USE_CERT_BUFFERS_2048 - #define NO_ERROR_STRINGS - /* Uncomment this setting if your toolchain does not offer time.h header */ - /* #define USER_TIME */ + #ifndef NO_CRYPT_TEST + #define USE_CERT_BUFFERS_2048 + #endif + #ifndef DEBUG_WOLFSSL + #define NO_ERROR_STRINGS + #endif + #define HAVE_ECC #define HAVE_ALPN #define USE_WOLF_STRTOK /* use with HAVE_ALPN */ #define HAVE_TLS_EXTENSIONS - #define HAVE_AESGCM #define HAVE_SUPPORTED_CURVES + + #define HAVE_AESGCM + #ifdef __IAR_SYSTEMS_ICC__ #pragma diag_suppress=Pa089 #elif !defined(__GNUC__) /* Suppress the sslpro warning */ #pragma diag_suppress=11 #endif + + /* Uncomment this setting if your toolchain does not offer time.h header */ + /* #define USER_TIME */ #include + #if defined(__ti__) && !defined(USER_TIME) + /* TI internal time() offsets by 2208988800 (1990 -> 1970), + * which overflows signed 32-bit */ + #define NO_TIME_SIGNED_CHECK + #endif #endif #ifdef EBSNET