Skip to content

Commit 517f4bd

Browse files
authored
Merge pull request #8549 from douzzer/20250311-aesxts-stream-armasm-and-unit-test-wolfcrypt-test
20250311-aesxts-stream-armasm-and-unit-test-wolfcrypt-test
2 parents fb23b48 + d2fc77a commit 517f4bd

7 files changed

Lines changed: 57 additions & 1073 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,6 @@ if(WOLFSSL_EXAMPLES)
25382538
tests/api/test_dtls.c
25392539
tests/api/test_ocsp.c
25402540
tests/api/test_evp.c
2541-
tests/hash.c
25422541
tests/srp.c
25432542
tests/suites.c
25442543
tests/w64wrapper.c
@@ -2547,7 +2546,8 @@ if(WOLFSSL_EXAMPLES)
25472546
tests/utils.c
25482547
testsuite/utils.c
25492548
examples/server/server.c
2550-
examples/client/client.c)
2549+
examples/client/client.c
2550+
wolfcrypt/test/test.c)
25512551
target_include_directories(unit_test PRIVATE
25522552
${CMAKE_CURRENT_BINARY_DIR})
25532553
target_compile_options(unit_test PUBLIC "-DNO_MAIN_DRIVER")

configure.ac

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ then
13121312
then
13131313
test "$enable_aesgcm_stream" = "" && test "$enable_aesgcm" = "yes" && enable_aesgcm_stream=yes
13141314
test "$enable_aesxts" = "" && enable_aesxts=yes
1315-
test "$enable_aesxts_stream" = "" && test "$enable_aesxts" = "yes" && (test "$enable_armasm" = "" || test "$enable_armasm" = "no") && enable_aesxts_stream=yes
1315+
test "$enable_aesxts_stream" = "" && test "$enable_aesxts" = "yes" && enable_aesxts_stream=yes
13161316
test "$enable_aessiv" = "" && enable_aessiv=yes
13171317
test "$enable_shake128" = "" && enable_shake128=yes
13181318
test "$enable_shake256" = "" && enable_shake256=yes
@@ -3221,7 +3221,6 @@ then
32213221
# Include options.h
32223222
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
32233223
ENABLED_ARMASM_CRYPTO=no
3224-
ENABLED_AESGCM_STREAM=no # not yet implemented
32253224
ENABLED_ARMASM_NEON=yes
32263225
ENABLED_ARM_32=yes
32273226
AC_MSG_NOTICE([32bit ARMv7-a found, setting mfpu to neon])
@@ -3241,7 +3240,6 @@ then
32413240
# Include options.h
32423241
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
32433242
ENABLED_ARMASM_CRYPTO=no
3244-
ENABLED_AESGCM_STREAM=no # not yet implemented
32453243
ENABLED_ARMASM_NEON=no
32463244
ENABLED_ARM_THUMB=yes
32473245
ENABLED_ARM_32=yes
@@ -3259,7 +3257,6 @@ then
32593257
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv6 -fomit-frame-pointer -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=6"
32603258
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
32613259
ENABLED_ARMASM_CRYPTO=no
3262-
ENABLED_AESGCM_STREAM=no # not yet implemented
32633260
ENABLED_ARMASM_NEON=no
32643261
ENABLED_ARM_32=yes
32653262
AC_MSG_NOTICE([32bit ARMv6 found])
@@ -3268,7 +3265,6 @@ then
32683265
AM_CPPFLAGS="$AM_CPPFLAGS -march=armv4 -fomit-frame-pointer -DWOLFSSL_ARMASM_NO_HW_CRYPTO -DWOLFSSL_ARM_ARCH=4"
32693266
AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN"
32703267
ENABLED_ARMASM_CRYPTO=no
3271-
ENABLED_AESGCM_STREAM=no # not yet implemented
32723268
ENABLED_ARMASM_NEON=no
32733269
ENABLED_ARM_32=yes
32743270
AC_MSG_NOTICE([32bit ARMv4 found])
@@ -3323,7 +3319,6 @@ AC_ARG_ENABLE([riscv-asm],
33233319
if test "$ENABLED_RISCV_ASM" != "no" && test "$ENABLED_ASM" = "yes"
33243320
then
33253321
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RISCV_ASM"
3326-
ENABLED_AESGCM_STREAM=no # not yet implemented
33273322
AC_MSG_NOTICE([64bit RISC-V assembly for AES])
33283323
fi
33293324

@@ -5584,11 +5579,8 @@ AS_CASE([$FIPS_VERSION],
55845579
(test "$FIPS_VERSION" != "dev" || test "$enable_aesgcm" != "no")],
55855580
[ENABLED_AESGCM="yes"; AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM"; AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESGCM"])
55865581
5587-
# AES-GCM streaming is part of the v6 FIPS suite, but isn't implemented
5588-
# for armasm on arm-v7 or earlier (see armasm setup above).
55895582
AS_IF([test "$ENABLED_AESGCM_STREAM" != "yes" &&
5590-
(test "$FIPS_VERSION" != "dev" || test "$enable_aesgcm_stream" != "no") &&
5591-
! (test "$ENABLED_ARMASM" = "yes" && test "$ENABLED_ARMASM_CRYPTO" = "no")],
5583+
(test "$FIPS_VERSION" != "dev" || test "$enable_aesgcm_stream" != "no")],
55925584
[ENABLED_AESGCM_STREAM="yes"])
55935585
55945586
AS_IF([test "x$ENABLED_AESOFB" = "xno" &&
@@ -5606,8 +5598,7 @@ AS_CASE([$FIPS_VERSION],
56065598
[AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
56075599
56085600
AS_IF([test "x$ENABLED_AESXTS_STREAM" = "xno" &&
5609-
(test "$FIPS_VERSION" != "dev" || test "$enable_aesxts_stream" != "no") &&
5610-
! (test "$ENABLED_ARMASM" = "yes" && test "$ENABLED_ARMASM_CRYPTO" = "no")],
5601+
(test "$FIPS_VERSION" != "dev" || test "$enable_aesxts_stream" != "no")],
56115602
[ENABLED_AESXTS_STREAM="yes"])
56125603
56135604
AS_IF([(test "$ENABLED_AESCCM" = "yes" && test "$HAVE_AESCCM_PORT" != "yes") ||
@@ -7961,6 +7952,11 @@ AC_ARG_ENABLE([crypttests],
79617952
)
79627953
AC_SUBST([ENABLED_CRYPT_TESTS])
79637954
7955+
if test "$ENABLED_CRYPT_TESTS" = "no"
7956+
then
7957+
AM_CFLAGS="$AM_CFLAGS -DNO_CRYPT_TEST"
7958+
fi
7959+
79647960
# Build wolfCrypt test and benchmark as libraries. This will compile test.c and
79657961
# benchmark.c and make their functions available via libraries, libwolfcrypttest
79667962
# and libwolfcryptbench, respectively. Note that this feature is not enabled by
@@ -9050,7 +9046,7 @@ if test "$ENABLED_LINUXKM_LKCAPI_REGISTER" != "none"
90509046
then
90519047
AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER"
90529048
9053-
if test "$ENABLED_AESGCM" != "no" && test "$ENABLED_AESGCM_STREAM" = "no" && test "$ENABLED_ARMASM" = "no" && test "$ENABLED_RISCV_ASM" = "no" && test "$ENABLED_FIPS" = "no"; then
9049+
if test "$ENABLED_AESGCM" != "no" && test "$ENABLED_AESGCM_STREAM" = "no" && test "$ENABLED_FIPS" = "no"; then
90549050
ENABLED_AESGCM_STREAM=yes
90559051
fi
90569052

0 commit comments

Comments
 (0)