diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index 14758637a..92b71b64f 100755 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -587,22 +587,21 @@ #include #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) diff --git a/wolfcrypt/src/port/pic32/pic32mz-crypt.c b/wolfcrypt/src/port/pic32/pic32mz-crypt.c index ae525949b..fb04c4b9b 100644 --- a/wolfcrypt/src/port/pic32/pic32mz-crypt.c +++ b/wolfcrypt/src/port/pic32/pic32mz-crypt.c @@ -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);