Merge pull request #1155 from dgarske/fixes_pic32mz

PIC32MZ minor build warning fixes
This commit is contained in:
Chris Conlon
2017-09-26 16:26:32 -06:00
committed by GitHub
2 changed files with 5 additions and 7 deletions

View File

@ -587,22 +587,21 @@
#include <wolfssl/wolfcrypt/port/pic32/pic32mz-crypt.h>
#if defined(HAVE_AESGCM) || defined(WOLFSSL_AES_DIRECT)
static int wc_AesEncrypt(Aes* aes, const byte* inBlock, byte* outBlock)
{
return wc_Pic32AesCrypt(aes->key_ce, aes->keylen, NULL, 0,
outBlock, inBlock, AES_BLOCK_SIZE,
PIC32_ENCRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_RECB);
}
#ifdef HAVE_AES_DECRYPT
#endif
#if defined(HAVE_AES_DECRYPT) && defined(WOLFSSL_AES_DIRECT)
static int wc_AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)
{
return wc_Pic32AesCrypt(aes->key_ce, aes->keylen, NULL, 0,
outBlock, inBlock, AES_BLOCK_SIZE,
PIC32_DECRYPTION, PIC32_ALGO_AES, PIC32_CRYPTOALGO_RECB);
}
#endif /* HAVE_AES_DECRYPT */
#endif
#elif defined(WOLFSSL_NRF51_AES)

View File

@ -216,8 +216,8 @@ static int Pic32Crypto(const byte* in, int inLen, word32* out, int outLen,
/* check for errors */
if (CESTATbits.ERROP || timeout <= 0) {
#if 0
printf("PIC32 Crypto: ERROP %x, ERRPHASE %x, TIMEOUT %d\n",
CESTATbits.ERROP, CESTATbits.ERRPHASE, timeout);
printf("PIC32 Crypto: ERROP %x, ERRPHASE %x, TIMEOUT %s\n",
CESTATbits.ERROP, CESTATbits.ERRPHASE, timeout <= 0 ? "yes" : "no");
#endif
ret = ASYNC_OP_E;
}
@ -407,7 +407,6 @@ static void update_engine(pic32mz_desc *desc, const byte *input, word32 len,
static void start_engine(pic32mz_desc *desc)
{
/* Wrap up the last buffer descriptor and enable it */
int i;
int bufferLen;
pic32mz_desc *uc_desc = KVA0_TO_KVA1(desc);