Skip to content

Commit 3a4472f

Browse files
Merge remote-tracking branch 'upstream/master' into zd20527
2 parents 0fcfade + cac309d commit 3a4472f

27 files changed

Lines changed: 3709 additions & 166 deletions

File tree

.github/workflows/rust-wrapper.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ jobs:
2828
- name: Build Rust Wrapper
2929
working-directory: wolfssl
3030
run: make -C wrapper/rust
31+
- name: Run Rust Wrapper Tests
32+
working-directory: wolfssl
33+
run: make -C wrapper/rust test

IDE/STM32Cube/wolfssl_example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ double current_time(void)
18301830
(void) date;
18311831

18321832
/* return seconds.milliseconds */
1833-
return ((double) time.Hours * 24) + ((double) time.Minutes * 60)
1833+
return ((double) time.Hours * 3600) + ((double) time.Minutes * 60)
18341834
+ (double) time.Seconds + ((double) subsec / 1000);
18351835
}
18361836
#endif /* HAL_RTC_MODULE_ENABLED */

certs/sm2/gen-sm2-certs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ openssl x509 -req -in server-sm2.csr -days 1000 -extfile ../renewcerts/wolfssl.c
9191
check_result $? "Generate certificate"
9292
rm server-sm2.csr
9393

94-
openssl x509 -in server-sm2-cert.pem -outform DER > server-sm2.der
94+
openssl x509 -in server-sm2-cert.pem -outform DER > server-sm2-cert.der
9595
check_result $? "Convert to DER"
9696
openssl x509 -in server-sm2-cert.pem -text > tmp.pem
9797
check_result $? "Add text"

certs/sm2/server-sm2-cert.der

732 Bytes
Binary file not shown.

configure.ac

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ AC_SUBST([WOLFSSL_CONFIG_ARGS])
4848

4949
# Store configure options and CFLAGS for debian rules generation
5050
CONFIGURE_OPTIONS="$ac_configure_args"
51-
CONFIGURE_CFLAGS="$CFLAGS"
5251
AC_SUBST([CONFIGURE_OPTIONS])
53-
AC_SUBST([CONFIGURE_CFLAGS])
5452

5553
# shared library versioning
5654
# The three numbers in the libwolfssl.so.*.*.* file name. Unfortunately
@@ -443,6 +441,8 @@ AS_CASE([$ENABLED_WOLFENGINE],
443441
# rand - wolfRand
444442
# v5 - FIPS 140-3 Cert 4718
445443
# cert4718 - alias for v5
444+
# v5.2.3 -- FIPS 140-3 with support for ARM acceleration, derived from Cert 4718
445+
# v5.2.4 -- FIPS 140-3 with support for Linux kernel mode, derived from v5.2.3
446446
# ready - FIPS 140-3 settings with in-tree wolfcrypt sources, feature locked
447447
# dev - FIPS 140-3 settings with in-tree wolfcrypt sources, features freely adjustable
448448
# v5-ready - Alias for ready.
@@ -499,6 +499,24 @@ AS_CASE([$ENABLED_FIPS],
499499
DEF_SP_MATH="no"
500500
DEF_FAST_MATH="yes"
501501
],
502+
[v5.2.3],[
503+
FIPS_VERSION="v5"
504+
HAVE_FIPS_VERSION_MAJOR=5
505+
HAVE_FIPS_VERSION_MINOR=2
506+
HAVE_FIPS_VERSION_PATCH=3
507+
ENABLED_FIPS="yes"
508+
DEF_SP_MATH="yes"
509+
DEF_FAST_MATH="no"
510+
],
511+
[v5.2.4],[
512+
FIPS_VERSION="v5"
513+
HAVE_FIPS_VERSION_MAJOR=5
514+
HAVE_FIPS_VERSION_MINOR=2
515+
HAVE_FIPS_VERSION_PATCH=4
516+
ENABLED_FIPS="yes"
517+
DEF_SP_MATH="yes"
518+
DEF_FAST_MATH="no"
519+
],
502520
[v5-RC12],[
503521
FIPS_VERSION="v5-RC12"
504522
HAVE_FIPS_VERSION_MAJOR=5
@@ -1107,6 +1125,7 @@ then
11071125
AC_MSG_ERROR([--enable-all-osp is incompatible with --enable-linuxkm-defaults])
11081126
fi
11091127

1128+
test "$enable_wolfguard" = "" && enable_wolfguard=yes
11101129
test "$enable_webserver" = "" && enable_webserver=yes
11111130

11121131
if test "$ENABLED_SP_MATH" != "yes"
@@ -1382,7 +1401,7 @@ then
13821401
test "$enable_aesxts_stream" = "" && test "$enable_aesxts" = "yes" && enable_aesxts_stream=yes
13831402
test "$enable_shake128" = "" && enable_shake128=yes
13841403
test "$enable_shake256" = "" && enable_shake256=yes
1385-
test "$enable_compkey" = "" && test "$ENABLED_LINUXKM_DEFAULTS" != "yes" && enable_compkey=yes
1404+
test "$enable_compkey" = "" && enable_compkey=yes
13861405
# AFALG lacks AES-ECB
13871406
test "$enable_srtp_kdf" = "" && test "$enable_afalg" != "yes" && enable_srtp_kdf=yes
13881407
fi
@@ -1411,6 +1430,24 @@ then
14111430
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_ISSUER_NAMES"
14121431
fi
14131432

1433+
# wolfGuard
1434+
AC_ARG_ENABLE([wolfguard],
1435+
[AS_HELP_STRING([--enable-wolfguard],[Enable wolfGuard dependencies (default: disabled)])],
1436+
[ ENABLED_WOLFGUARD=$enableval ],
1437+
[ ENABLED_WOLFGUARD=no ]
1438+
)
1439+
if test "$ENABLED_WOLFGUARD" = "yes"
1440+
then
1441+
test "$enable_ecc" = "" && enable_ecc=yes
1442+
test "$enable_sha256" = "" && enable_sha256=yes
1443+
test "$enable_aesgcm" = "" && enable_aesgcm=yes
1444+
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6
1445+
then
1446+
test "$enable_compkey" = "" && enable_compkey=yes
1447+
test "$enable_aesgcm_stream" = "" && enable_aesgcm_stream=yes
1448+
fi
1449+
fi
1450+
14141451
# liboqs
14151452
ENABLED_LIBOQS="no"
14161453
tryliboqsdir=""
@@ -3792,6 +3829,18 @@ then
37923829
AM_CFLAGS="$AM_CFLAGS -DHAVE_INTEL_RDRAND"
37933830
fi
37943831

3832+
# INTEL RDSEED
3833+
AC_ARG_ENABLE([intelrdseed],
3834+
[AS_HELP_STRING([--enable-intelrdseed],[Enable Intel rdseed as preferred RNG seeding source (default: disabled)])],
3835+
[ ENABLED_INTELRDSEED=$enableval ],
3836+
[ ENABLED_INTELRDSEED=no ]
3837+
)
3838+
3839+
if test "$ENABLED_INTELRDSEED" = "yes"
3840+
then
3841+
AM_CFLAGS="$AM_CFLAGS -DHAVE_INTEL_RDSEED"
3842+
fi
3843+
37953844
# AMD RDSEED
37963845
AC_ARG_ENABLE([amdrand],
37973846
[AS_HELP_STRING([--enable-amdrand],[Enable AMD rdseed as preferred RNG seeding source (default: disabled)])],
@@ -5669,6 +5718,9 @@ AC_ARG_ENABLE([pwdbased],
56695718
# wolfEntropy Software Jitter SP800-90B certifiable entropy source
56705719

56715720
if test "$ENABLED_LINUXKM_DEFAULTS" = "yes" && \
5721+
test "$ENABLED_AMDRDSEED" != "yes" && \
5722+
test "$ENABLED_INTELRDRAND" != "yes" && \
5723+
test "$ENABLED_INTELRDSEED" != "yes" && \
56725724
(test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6)
56735725
then
56745726
ENABLED_ENTROPY_MEMUSE_DEFAULT=yes
@@ -5760,7 +5812,7 @@ AS_CASE([$FIPS_VERSION],
57605812
(test "$FIPS_VERSION" != "dev" || test "$enable_keygen" != "no")],
57615813
[ENABLED_KEYGEN="yes"; AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN"])
57625814
5763-
# AS_IF([test "$ENABLED_COMPKEY" = "yes" &&
5815+
# AS_IF([test "$ENABLED_COMPKEY" != "yes" &&
57645816
# (test "$FIPS_VERSION" != "dev" || test "$enable_compkey" != "yes")],
57655817
# [ENABLED_COMPKEY="yes"])
57665818
@@ -10650,6 +10702,17 @@ if test "$enable_shared" = "no"; then
1065010702
fi
1065110703
fi
1065210704
10705+
if test "$ENABLED_WOLFGUARD" = "yes"; then
10706+
if test "$ENABLED_ECC" = "no" ||
10707+
test "$ENABLED_SHA256" = "no" ||
10708+
test "$ENABLED_AESGCM" = "no" ||
10709+
test "$ENABLED_HMAC" = "no" ||
10710+
test "$ENABLED_RNG" = "no"
10711+
then
10712+
AC_MSG_ERROR([--enable-wolfguard requires ECC, SHA256-HMAC, AES-GCM, and RNG.])
10713+
fi
10714+
fi
10715+
1065310716
if test "x$ENABLED_LINUXKM" = "xyes"; then
1065410717
AX_SIMD_CC_COMPILER_FLAGS
1065510718
AC_SUBST([CFLAGS_FPU_DISABLE])
@@ -10714,9 +10777,6 @@ if test "x$ENABLED_LINUXKM" = "xyes"; then
1071410777
if test "$ENABLED_STACKLOG" = "yes"; then
1071510778
AC_MSG_ERROR([--enable-stacklog is incompatible with --enable-linuxkm.])
1071610779
fi
10717-
if test "$ENABLED_COMPKEY" = "yes"; then
10718-
AC_MSG_ERROR([--enable-compkey is incompatible with --enable-linuxkm.])
10719-
fi
1072010780
fi
1072110781
1072210782
AS_IF([test "$ENABLED_ASM" = "no" && (test "$ENABLED_INTELASM" != "no" || \

debian/rules.in

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Store the configure options and CFLAGS used during ./configure
44
# This file is generated from rules.in by the configure script
55
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
6-
CONFIGURE_CFLAGS = @CONFIGURE_CFLAGS@
76
ENABLED_FIPS = @ENABLED_FIPS@
87

98
# Use debhelper with automatic sequence
@@ -16,18 +15,17 @@ override_dh_auto_configure:
1615
--build=$(DEB_BUILD_GNU_TYPE) \
1716
--host=$(DEB_HOST_GNU_TYPE) \
1817
--prefix=/usr \
19-
--mandir=\$${prefix}/share/man \
20-
--infodir=\$${prefix}/share/info \
18+
--mandir=/usr/share/man \
19+
--infodir=/usr/share/info \
2120
--sysconfdir=/etc \
2221
--localstatedir=/var \
23-
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
24-
--libexecdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
22+
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
23+
--libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
2524
--disable-maintainer-mode \
2625
--disable-dependency-tracking \
2726
--enable-shared \
2827
--enable-static \
29-
$(CONFIGURE_OPTIONS) \
30-
CFLAGS="$(CONFIGURE_CFLAGS)"
28+
$(CONFIGURE_OPTIONS)
3129

3230
# Override test to skip them (optional, remove if you want to run tests)
3331
#override_dh_auto_test:
@@ -50,22 +48,6 @@ override_dh_auto_install:
5048
dh_auto_install
5149
# Remove .la files (not needed in modern Debian packages)
5250
find debian/tmp -name '*.la' -delete
53-
# Move libraries to multiarch directory if needed
54-
if [ -d debian/tmp/usr/lib ]; then \
55-
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH); \
56-
if [ -f debian/tmp/usr/lib/libwolfssl.so.* ]; then \
57-
mv debian/tmp/usr/lib/libwolfssl.so.* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; \
58-
fi; \
59-
if [ -f debian/tmp/usr/lib/libwolfssl.so ]; then \
60-
mv debian/tmp/usr/lib/libwolfssl.so debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; \
61-
fi; \
62-
if [ -f debian/tmp/usr/lib/libwolfssl.a ]; then \
63-
mv debian/tmp/usr/lib/libwolfssl.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; \
64-
fi; \
65-
if [ -d debian/tmp/usr/lib/pkgconfig ]; then \
66-
mv debian/tmp/usr/lib/pkgconfig debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; \
67-
fi; \
68-
fi
6951

7052
# Set proper permissions and strip symbols
7153
override_dh_strip:

0 commit comments

Comments
 (0)