Merge branch 'master' of github.com:cyassl/cyassl

This commit is contained in:
John Safranek
2013-10-02 15:27:10 -07:00
16 changed files with 324 additions and 80 deletions

View File

@@ -100,6 +100,11 @@
#define XTIME(t1) pic32_time((t1))
#define XGMTIME(c) gmtime((c))
#define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t))
#elif defined(FREESCALE_MQX)
#include <time.h>
#define XTIME(t1) mqx_time((t1))
#define XGMTIME(c) gmtime((c))
#define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t))
#elif defined(CYASSL_MDK_ARM)
#include <rtl.h>
#undef RNG
@@ -289,6 +294,25 @@ time_t pic32_time(time_t* timer)
#endif /* MICROCHIP_TCPIP */
#ifdef FREESCALE_MQX
time_t mqx_time(time_t* timer)
{
time_t localTime;
TIME_STRUCT time_s;
if (timer == NULL)
timer = &localTime;
_time_get(&time_s);
*timer = (time_t) time_s.SECONDS;
return *timer;
}
#endif /* FREESCALE_MQX */
static INLINE word32 btoi(byte b)
{
return b - 0x30;

View File

@@ -487,5 +487,10 @@ static void HmacCaviumSetKey(Hmac* hmac, int type, const byte* key,
#endif /* HAVE_CAVIUM */
int CyaSSL_GetHmacMaxSize(void)
{
return MAX_DIGEST_SIZE;
}
#endif /* NO_HMAC */

View File

@@ -3765,7 +3765,7 @@ int mp_sqrmod (mp_int * a, mp_int * b, mp_int * c)
#endif
#if defined(HAVE_ECC) || !defined(NO_PWDBASED)
#if defined(HAVE_ECC) || !defined(NO_PWDBASED) || defined(CYASSL_SNIFFER)
/* single digit addition */
int mp_add_d (mp_int* a, mp_digit b, mp_int* c)