forked from wolfSSL/wolfssl
adjust time.h for port due to tm struct change
This commit is contained in:
@@ -240,7 +240,8 @@
|
|||||||
#endif /* WOLFSSL_STATIC_MEMORY */
|
#endif /* WOLFSSL_STATIC_MEMORY */
|
||||||
|
|
||||||
/* these cases do not have intermediate hashing support */
|
/* these cases do not have intermediate hashing support */
|
||||||
#if (defined(WOLFSSL_AFALG_XILINX_SHA3) && !defined(WOLFSSL_AFALG_HASH_KEEP))
|
#if (defined(WOLFSSL_AFALG_XILINX_SHA3) && !defined(WOLFSSL_AFALG_HASH_KEEP)) \
|
||||||
|
&& !defined(WOLFSSL_XILINX_CRYPT)
|
||||||
#define NO_INTM_HASH_TEST
|
#define NO_INTM_HASH_TEST
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -755,7 +756,7 @@ initDefaultName();
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_AESGCM) && defined(WOLFSSL_AES_128) && \
|
#if defined(HAVE_AESGCM) && defined(WOLFSSL_AES_128) && \
|
||||||
!defined(WOLFSSL_AFALG_XILINX_AES)
|
!defined(WOLFSSL_AFALG_XILINX_AES) && !defined(WOLFSSL_XILINX_CRYPT)
|
||||||
if ( (ret = gmac_test()) != 0)
|
if ( (ret = gmac_test()) != 0)
|
||||||
return err_sys("GMAC test failed!\n", ret);
|
return err_sys("GMAC test failed!\n", ret);
|
||||||
else
|
else
|
||||||
@@ -842,7 +843,7 @@ initDefaultName();
|
|||||||
if ( (ret = aesgcm_test()) != 0)
|
if ( (ret = aesgcm_test()) != 0)
|
||||||
return err_sys("AES-GCM test failed!\n", ret);
|
return err_sys("AES-GCM test failed!\n", ret);
|
||||||
#endif
|
#endif
|
||||||
#ifndef WOLFSSL_AFALG_XILINX_AES
|
#if !defined(WOLFSSL_AFALG_XILINX_AES) && !defined(WOLFSSL_XILINX_CRYPT)
|
||||||
if ((ret = aesgcm_default_test()) != 0) {
|
if ((ret = aesgcm_default_test()) != 0) {
|
||||||
return err_sys("AES-GCM test failed!\n", ret);
|
return err_sys("AES-GCM test failed!\n", ret);
|
||||||
}
|
}
|
||||||
@@ -2713,7 +2714,7 @@ static int sha3_384_test(void)
|
|||||||
a.inLen = XSTRLEN(a.input);
|
a.inLen = XSTRLEN(a.input);
|
||||||
a.outLen = WC_SHA3_384_DIGEST_SIZE;
|
a.outLen = WC_SHA3_384_DIGEST_SIZE;
|
||||||
|
|
||||||
#ifdef WOLFSSL_AFALG_XILINX_SHA3
|
#if defined(WOLFSSL_AFALG_XILINX_SHA3) || defined(WOLFSSL_XILINX_CRYPT)
|
||||||
/* NIST test vector with a length that is a multiple of 4 */
|
/* NIST test vector with a length that is a multiple of 4 */
|
||||||
b.input = "\x7d\x80\xb1\x60\xc4\xb5\x36\xa3\xbe\xb7\x99\x80\x59\x93\x44"
|
b.input = "\x7d\x80\xb1\x60\xc4\xb5\x36\xa3\xbe\xb7\x99\x80\x59\x93\x44"
|
||||||
"\x04\x7c\x5f\x82\xa1\xdf\xc3\xee\xd4";
|
"\x04\x7c\x5f\x82\xa1\xdf\xc3\xee\xd4";
|
||||||
@@ -2740,7 +2741,11 @@ static int sha3_384_test(void)
|
|||||||
c.inLen = XSTRLEN(c.input);
|
c.inLen = XSTRLEN(c.input);
|
||||||
c.outLen = WC_SHA3_384_DIGEST_SIZE;
|
c.outLen = WC_SHA3_384_DIGEST_SIZE;
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_XILINX_CRYPT
|
||||||
|
test_sha[0] = b; /* hardware acc. can not handle "" string */
|
||||||
|
#else
|
||||||
test_sha[0] = a;
|
test_sha[0] = a;
|
||||||
|
#endif
|
||||||
test_sha[1] = b;
|
test_sha[1] = b;
|
||||||
test_sha[2] = c;
|
test_sha[2] = c;
|
||||||
|
|
||||||
@@ -7509,7 +7514,7 @@ int aesgcm_test(void)
|
|||||||
#endif /* HAVE_AES_DECRYPT */
|
#endif /* HAVE_AES_DECRYPT */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WOLFSSL_AFALG_XILINX_AES
|
#if !defined(WOLFSSL_AFALG_XILINX_AES) && !defined(WOLFSSL_XILINX_CRYPT)
|
||||||
#ifdef BENCH_AESGCM_LARGE
|
#ifdef BENCH_AESGCM_LARGE
|
||||||
/* Variable plain text length test */
|
/* Variable plain text length test */
|
||||||
for (plen=1; plen<BENCH_AESGCM_LARGE; plen++) {
|
for (plen=1; plen<BENCH_AESGCM_LARGE; plen++) {
|
||||||
@@ -7625,7 +7630,8 @@ int aesgcm_test(void)
|
|||||||
#endif /* WOLFSSL_AES_128 */
|
#endif /* WOLFSSL_AES_128 */
|
||||||
#endif /* ENABLE_NON_12BYTE_IV_TEST */
|
#endif /* ENABLE_NON_12BYTE_IV_TEST */
|
||||||
|
|
||||||
#if defined(WOLFSSL_AES_256) && !defined(WOLFSSL_AFALG_XILINX_AES)
|
#if defined(WOLFSSL_AES_256) && !defined(WOLFSSL_AFALG_XILINX_AES) && \
|
||||||
|
!defined(WOLFSSL_XILINX_CRYPT)
|
||||||
XMEMSET(resultT, 0, sizeof(resultT));
|
XMEMSET(resultT, 0, sizeof(resultT));
|
||||||
XMEMSET(resultC, 0, sizeof(resultC));
|
XMEMSET(resultC, 0, sizeof(resultC));
|
||||||
XMEMSET(resultP, 0, sizeof(resultP));
|
XMEMSET(resultP, 0, sizeof(resultP));
|
||||||
|
@@ -1340,7 +1340,6 @@ extern void uITRON4_free(void *p) ;
|
|||||||
|
|
||||||
|
|
||||||
#if defined(WOLFSSL_XILINX)
|
#if defined(WOLFSSL_XILINX)
|
||||||
#define USER_TIME /* XTIME in asn.c */
|
|
||||||
#define NO_WOLFSSL_DIR
|
#define NO_WOLFSSL_DIR
|
||||||
#define NO_DEV_RANDOM
|
#define NO_DEV_RANDOM
|
||||||
#define HAVE_AESGCM
|
#define HAVE_AESGCM
|
||||||
|
@@ -502,6 +502,10 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|||||||
#endif
|
#endif
|
||||||
#define NEED_TMP_TIME
|
#define NEED_TMP_TIME
|
||||||
|
|
||||||
|
#elif defined(WOLFSSL_XILINX) && defined(FREERTOS)
|
||||||
|
#define USER_TIME
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#elif defined(HAVE_RTP_SYS)
|
#elif defined(HAVE_RTP_SYS)
|
||||||
#include "os.h" /* dc_rtc_api needs */
|
#include "os.h" /* dc_rtc_api needs */
|
||||||
#include "dc_rtc_api.h" /* to get current time */
|
#include "dc_rtc_api.h" /* to get current time */
|
||||||
|
Reference in New Issue
Block a user