Skip to content

Commit 3a89c45

Browse files
authored
Merge pull request #7454 from lealem47/stm32AesCtr
Fix for AES CTR on STM32
2 parents b17ad46 + eafa425 commit 3a89c45

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,9 +1915,9 @@ AC_ARG_ENABLE([opensslcoexist],
19151915

19161916
if test "x$ENABLED_OPENSSLCOEXIST" = "xyes" || test "$ENABLED_WOLFENGINE" = "yes"
19171917
then
1918-
# make sure old names are disabled
1919-
enable_oldnames=no
1920-
1918+
# make sure old names are disabled (except RNG)
1919+
AM_CFLAGS="$AM_CFLAGS -DNO_OLD_WC_NAMES -DNO_OLD_SSL_NAMES"
1920+
AM_CFLAGS="$AM_CFLAGS -DNO_OLD_SHA_NAMES -DNO_OLD_MD5_NAME"
19211921
AM_CFLAGS="$AM_CFLAGS -DOPENSSL_COEXIST"
19221922
fi
19231923

wolfcrypt/src/aes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6151,7 +6151,7 @@ int wc_AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
61516151
return BAD_FUNC_ARG;
61526152
}
61536153

6154-
return wc_AesSetKeyLocal(aes, key, len, iv, dir, 0);
6154+
return wc_AesSetKey(aes, key, len, iv, dir);
61556155
}
61566156

61576157
#endif /* NEED_AES_CTR_SOFT */

wolfcrypt/test/test.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,10 @@ wc_test_ret_t wolfcrypt_test(void* args)
996996
heap_baselineBytes = wolfCrypt_heap_peakBytes_checkpoint();
997997
#endif
998998

999+
#ifdef WC_RNG_SEED_CB
1000+
wc_SetSeed_Cb(wc_GenerateSeed);
1001+
#endif
1002+
9991003
printf("------------------------------------------------------------------------------\n");
10001004
printf(" wolfSSL version %s\n", LIBWOLFSSL_VERSION_STRING);
10011005
#ifdef WOLF_CRYPTO_CB
@@ -2094,10 +2098,6 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
20942098
printf("Math: %s\n", wc_GetMathInfo());
20952099
#endif
20962100

2097-
#ifdef WC_RNG_SEED_CB
2098-
wc_SetSeed_Cb(wc_GenerateSeed);
2099-
#endif
2100-
21012101
#ifdef HAVE_STACK_SIZE
21022102
StackSizeCheck(&args, wolfcrypt_test);
21032103
#else

wolfssl/wolfcrypt/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388
* system or other set of headers included by wolfSSL already defines
389389
* RNG. Examples are:
390390
* wolfEngine, wolfProvider and potentially other use-cases */
391-
#ifndef RNG
391+
#if !defined(RNG) && !defined(NO_OLD_RNGNAME)
392392
#define RNG WC_RNG
393393
#endif
394394
#endif

0 commit comments

Comments
 (0)