adjustment after rebase

This commit is contained in:
Jacob Barthelmeh
2021-02-22 22:45:07 +07:00
parent 69a0b643be
commit 79ec07f5e1
8 changed files with 9 additions and 33 deletions

View File

@ -35,6 +35,7 @@ include IDE/M68K/include.am
include IDE/HEXAGON/include.am
include IDE/RISCV/include.am
include IDE/XilinxSDK/include.am
include IDE/VisualDSP/include.am
include IDE/QNX/include.am
EXTRA_DIST+= IDE/IAR-EWARM IDE/MDK-ARM IDE/MDK5-ARM IDE/MYSQL IDE/LPCXPRESSO IDE/HEXIWEAR IDE/Espressif IDE/zephyr

View File

@ -753,6 +753,7 @@ static const char* bench_result_words2[][5] = {
/* Asynchronous helper macros */
#ifdef WOLFSSL_QNX_CAAM
#include <wolfssl/wolfcrypt/port/caam/wolfcaam.h>
static THREAD_LS_T int devId = WOLFSSL_CAAM_DEVID;
#else
static THREAD_LS_T int devId = INVALID_DEVID;

View File

@ -3050,33 +3050,6 @@ int wc_AesSetIV(Aes* aes, const byte* iv)
#if defined(HAVE_COLDFIRE_SEC)
#error "Coldfire SEC doesn't yet support AES direct"
#elif defined(FREESCALE_LTC)
/* Allow direct access to one block encrypt */
void wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in)
{
byte *key;
uint32_t keySize;
key = (byte*)aes->key;
wc_AesGetKeySize(aes, &keySize);
LTC_AES_EncryptEcb(LTC_BASE, in, out, AES_BLOCK_SIZE,
key, keySize);
}
/* Allow direct access to one block decrypt */
void wc_AesDecryptDirect(Aes* aes, byte* out, const byte* in)
{
byte *key;
uint32_t keySize;
key = (byte*)aes->key;
wc_AesGetKeySize(aes, &keySize);
LTC_AES_DecryptEcb(LTC_BASE, in, out, AES_BLOCK_SIZE,
key, keySize, kLTC_EncryptKey);
}
#elif defined(WOLFSSL_IMX6_CAAM) && !defined(NO_IMX6_CAAM_AES) && \
!defined(WOLFSSL_QNX_CAAM)
/* implemented in wolfcrypt/src/port/caam/caam_aes.c */

View File

@ -25,6 +25,9 @@
#endif
#include <wolfssl/wolfcrypt/settings.h>
#ifdef WOLFSSL_QNX_CAAM
#include <wolfssl/wolfcrypt/port/caam/wolfcaam.h>
#endif
#if defined(WOLFSSL_CMAC) && !defined(NO_AES) && defined(WOLFSSL_AES_DIRECT)

View File

@ -8045,9 +8045,8 @@ int wc_ecc_export_ex(ecc_key* key, byte* qx, word32* qxLen,
/* private key, d */
if (d != NULL) {
if (dLen == NULL ||
(key->type != ECC_PRIVATEKEY && key->type != ECC_PRIVATEKEY_ONLY)) {
(key->type != ECC_PRIVATEKEY && key->type != ECC_PRIVATEKEY_ONLY))
return BAD_FUNC_ARG;
}
#if defined(WOLFSSL_ATECC508A) || defined(WOLFSSL_ATECC608A)
/* Hardware cannot export private portion */

View File

@ -2325,7 +2325,8 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
for (i = 0; i < times; i++) {
buf[0].BufferType = DataBuffer | LastBuffer;
buf[0].TheAddress = (CAAM_ADDRESS)(output + idx);
buf[0].Length = ((sz - idx) < 44)? sz-idx:44;
buf[0].Length = ((sz - idx) < WC_CAAM_MAX_ENTROPY)?
sz - idx : WC_CAAM_MAX_ENTROPY;
args[0] = buf[0].Length;
ret = wc_caamAddAndWait(buf, 1, args, CAAM_ENTROPY);

View File

@ -499,7 +499,6 @@ WOLFSSL_TEST_SUBROUTINE int mutex_test(void);
#if defined(USE_WOLFSSL_MEMORY) && !defined(FREERTOS)
WOLFSSL_TEST_SUBROUTINE int memcb_test(void);
#endif
#ifdef WOLFSSL_IMX6_CAAM_BLOB
WOLFSSL_TEST_SUBROUTINE int blob_test(void);
#endif
@ -1430,7 +1429,6 @@ initDefaultName();
args.argc = argc;
args.argv = argv;
#endif
wolfSSL_Debugging_ON();
if ((ret = wolfCrypt_Init()) != 0) {
printf("wolfCrypt_Init failed %d\n", ret);
err_sys("Error with wolfCrypt_Init!\n", -1003);
@ -20185,7 +20183,6 @@ static int ecc_test_vector_item(const eccVector* vector)
ret = wc_ecc_verify_hash(sig, sigSz, (byte*)vector->msg,
vector->msgLen, &verify, userA);
} while (ret == WC_PENDING_E);
if (ret != 0)
goto done;
TEST_SLEEP();

View File

@ -74,6 +74,7 @@ WOLFSSL_API int wc_caamCoverKey(byte* in, word32 inSz, byte* out, word32* outSz,
#define WC_CAAM_BLOB_BLACK 2
#define WC_CAAM_RED_KEYMOD_SZ 8
#define WC_CAAM_BLACK_KEYMOD_SZ 8
#define WC_CAAM_MAX_ENTROPY 44
#ifndef WOLFSSL_QNX_CAAM
WOLFSSL_API int wc_caamSetResource(IODevice ioDev);