Skip to content

Commit

Permalink
Merge pull request #7454 from lealem47/stm32AesCtr
Browse files Browse the repository at this point in the history
Fix for AES CTR on STM32
  • Loading branch information
dgarske authored Apr 22, 2024
2 parents b17ad46 + eafa425 commit 3a89c45
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1915,9 +1915,9 @@ AC_ARG_ENABLE([opensslcoexist],

if test "x$ENABLED_OPENSSLCOEXIST" = "xyes" || test "$ENABLED_WOLFENGINE" = "yes"
then
# make sure old names are disabled
enable_oldnames=no

# make sure old names are disabled (except RNG)
AM_CFLAGS="$AM_CFLAGS -DNO_OLD_WC_NAMES -DNO_OLD_SSL_NAMES"
AM_CFLAGS="$AM_CFLAGS -DNO_OLD_SHA_NAMES -DNO_OLD_MD5_NAME"
AM_CFLAGS="$AM_CFLAGS -DOPENSSL_COEXIST"
fi

Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -6151,7 +6151,7 @@ int wc_AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
return BAD_FUNC_ARG;
}

return wc_AesSetKeyLocal(aes, key, len, iv, dir, 0);
return wc_AesSetKey(aes, key, len, iv, dir);
}

#endif /* NEED_AES_CTR_SOFT */
Expand Down
8 changes: 4 additions & 4 deletions wolfcrypt/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,10 @@ wc_test_ret_t wolfcrypt_test(void* args)
heap_baselineBytes = wolfCrypt_heap_peakBytes_checkpoint();
#endif

#ifdef WC_RNG_SEED_CB
wc_SetSeed_Cb(wc_GenerateSeed);
#endif

printf("------------------------------------------------------------------------------\n");
printf(" wolfSSL version %s\n", LIBWOLFSSL_VERSION_STRING);
#ifdef WOLF_CRYPTO_CB
Expand Down Expand Up @@ -2094,10 +2098,6 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
printf("Math: %s\n", wc_GetMathInfo());
#endif

#ifdef WC_RNG_SEED_CB
wc_SetSeed_Cb(wc_GenerateSeed);
#endif

#ifdef HAVE_STACK_SIZE
StackSizeCheck(&args, wolfcrypt_test);
#else
Expand Down
2 changes: 1 addition & 1 deletion wolfssl/wolfcrypt/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
* system or other set of headers included by wolfSSL already defines
* RNG. Examples are:
* wolfEngine, wolfProvider and potentially other use-cases */
#ifndef RNG
#if !defined(RNG) && !defined(NO_OLD_RNGNAME)
#define RNG WC_RNG
#endif
#endif
Expand Down

0 comments on commit 3a89c45

Please sign in to comment.