1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00

1098 Commits

Author SHA1 Message Date
Paul Adelsbach
44e523ce48 CI: extend trackmemory timeouts based on recent runtimes 2026-10-23 14:26:03 -07:00
philljj
06d4408d87 Merge pull request #11799 from padelsbach/swdev-falcon
Tests: add Falcon to swdev for crypto cb testing
2026-10-22 22:30:20 -05:00
philljj
ad48539fde Merge pull request #11688 from dgarske/mpfs_athena
Add Microchip PolarFire SoC Athena F5200 (TeraFire) crypto callback port
2026-10-22 10:27:36 -05:00
Tobias Frauenschläger
58dacab52a Merge pull request #11841 from MarkAtwood/ci/socat-expect-fail-flakes
ci(socat): expect-fail 4 flaky non-TLS tests.

Jenkins failure is unrelated.
2026-10-22 08:25:53 +02:00
kaleb-himes
18c76cb584 Build the AMD APERF wolfEntropy timer in the trackmemory CI job 2026-10-21 22:21:07 -07:00
Paul Adelsbach
94b375ec9d Tests: add Falcon to swdev for crypto cb testing 2026-10-21 17:13:12 -07:00
Mark Atwood
6674166407 ci(socat): expect-fail 4 flaky non-TLS tests 2026-10-21 09:55:10 -07:00
David Garske
41d6398556 Add Microchip PolarFire SoC Athena F5200 crypto callback port 2026-10-21 09:37:55 -07:00
philljj
b0afe82085 Merge pull request #11238 from padelsbach/crypto-cb-frodo
Add crypto callback for Frodo-kem
2026-10-21 10:31:26 -05:00
philljj
4b4e21ad23 Merge pull request #11812 from douzzer/20261019-kernel-cryptonly-default
20261019-kernel-cryptonly-default
2026-10-21 08:23:22 -05:00
philljj
85cd9d0514 Merge pull request #11542 from Frauschi/zephyr-cert-kconfig
Zephyr: Kconfig options for certificate management, PKCS#7 and the OpenSSL layer
2026-10-20 16:07:54 -05:00
Andrew Hutchings
9d28f4e99c Turn off objtool for linuxkm PIE CI builds
On the ubuntu-24.04 runner image with kernel 7.0.0-1017-azure, every
--enable-linuxkm-pie build fails with:

  libwolfssl.o: error: objtool: wc_HmacSizeByType+0x55: unannotated
  intra-function call

PIE builds use -mindirect-branch=thunk-inline, whose inline retpolines
are calls to a label inside the same function. On 7.0 objtool checks
the linked libwolfssl.o, which ignores OBJECT_FILES_NON_STANDARD, and
rejects them. The same builds pass on the older 6.17 runner kernel, so
the failure depends on which image a job lands on.

Pass KBUILD_EXTRA_FLAGS=FORCE_GLOBAL_OBJTOOL_OFF=1 for the PIE builds
in the Membrowse linuxkm-pie target and the Kernel Module Build
workflow. linuxkm/Kbuild then undefines CONFIG_OBJTOOL, which disables
all objtool passes since the kernel's objtool rules are gated on it.
Non-PIE builds keep objtool.
2026-10-20 18:18:36 +01:00
Andrew Hutchings
0a7dda2e9b Pin membrowse-action to v1.2.15 in Membrowse workflows
membrowse-action v1.2.16 moved the floating v1 tag to a release whose
action.yml has "${{ github.workspace }}" in an input description. The
runner rejects the github context there, so every Membrowse analyze job
fails in "Set up job" with "Unrecognized named-value: 'github'". The
onboard action has the same problem, and the comment workflow then
fails because no report was uploaded.

Pin the report, onboard and comment workflows to the v1.2.15 commit SHA,
the last release that worked, as the Zephyr workflow already does.
2026-10-20 17:59:34 +01:00
Daniel Pouzzner
30d3d425cf .github/membrowse-targets.json, .github/workflows/linuxkm.yml: add a couple missing --disable-cryptonlys. 2026-10-19 15:49:53 -05:00
Daniel Pouzzner
00dc4c1317 configure.ac: change default ENABLED_CRYPTONLY to follow $KERNEL_MODE_DEFAULTS
-- i.e., by default, disable the TLS/DTLS layer when KERNEL_MODE_DEFAULTS;

CMakeLists.txt: add WOLFSSL_KERNEL_SETTINGS and make existing
  WOLFSSL_LINUXKM_DEFAULTS an alias for it, and make WOLFSSL_CRYPT_ONLY default
  follow WOLFSSL_KERNEL_SETTINGS via new internal variable
  WOLFSSL_CRYPT_ONLY_DEFAULT;

.github/workflows/linuxkm.yml: explicitly --disable-cryptonly in the
  --enable-all scenario;

.github/workflows/fips-dev-no-post.yml: explicitly --disable-cryptonly in the
  kernel-settings* scenarios.
2026-10-19 15:04:08 -05:00
philljj
abeea08c7d Merge pull request #11606 from Frauschi/fenrir
Static memory, session cache, DH reuse and WOLF_C89 print fixes
2026-10-19 11:41:04 -05:00
Paul Adelsbach
4729b8994c PR feedback: add Frodo coverage in swdev, allow separate make/encapsulate/decapsulate testing individually 2026-10-16 16:03:31 -07:00
Paul Adelsbach
57b999a588 Add crypto callback for Frodo-kem 2026-10-16 16:03:31 -07:00
philljj
25651d0535 Merge pull request #11715 from dgarske/sp_nonblock_fast
Add SP ECC non-blocking support for large implementation
2026-10-16 14:23:04 -05:00
Tobias Frauenschläger
bc9c079025 Generate wolfIP test certificates before the parallel build
wolfIP releases up to v1.1.0 have three Makefile rules that each run
tools/certs/mkcerts.sh, one per generated cert source. Under make -j
they run concurrently and clobber each other's files, leaving
server_cert.c without server_der, so build/test-wolfssl intermittently
fails to link. On the latest-release leg the job then asks for a
breaks-wolfip= token although wolfSSL broke nothing.

Run mkcerts.sh once before make so the cert sources already exist.
This stays harmless once wolfIP serializes the rule itself, and keeps
the released tags, which will never get that fix, building reliably.
The script is only run when present so a later wolfIP layout change
cannot fail the job here.
2026-10-16 13:25:53 +02:00
Tobias Frauenschläger
b9426d0073 Address review comment
- WOLFSSL_IP_ALT_NAME no longer requires NETWORKING with USER_IO or
  CRYPTO_ONLY: the only socket use is the TLS layer's MatchIPv6(), which
  is compiled out under WOLFSSL_USER_IO. prj-x25519-ed448.conf now
  enables it with user I/O and no network stack.
- WOLFSSL_CERT_EXT no longer depends on WOLFSSL_CERT_GEN, matching
  --enable-certext, since the macro also enables extension decoding.
- Add a wolfssl_tls_sock build with tls_cert.conf, so the TLS-only
  options (post-handshake auth, IP SAN matching, kept peer cert) are
  linked into a real handshake rather than dropped by the wolfCrypt test
  app.
- Document the app-directory overlay fallback in zephyr-test.sh usage.
2026-10-16 09:10:37 +02:00
Tobias Frauenschläger
97a584effc CI: Zephyr: build the certificate and curve-split Kconfig scenarios
The wolfssl_test_cert, _x25519_ed448 and _ed25519_x448 twister scenarios
were not run by any workflow: zephyr.yml names its scenarios explicitly
and zephyr-4.x.yml builds from builds.txt instead of running twister.

Add all three to builds.txt, so each builds and runs on native_sim for
every Zephyr version in the 4.x matrix. The curve-split scenarios move
from extra_configs into prj-x25519-ed448.conf and prj-ed25519-x448.conf
so twister and the CI list read the same files, and zephyr-test.sh now
takes an overlay that is not in its own directory from the app
directory instead.
2026-10-16 09:10:37 +02:00
philljj
eb113cac67 Merge pull request #11547 from padelsbach/cbonly-lmsxmss
Add CB_ONLY mode for LMS+XMSS, add swdev
2026-10-15 17:01:48 -05:00
David Garske
fa565101ab mldsa: add WOLFSSL_MLDSA_ALLOW_WEAK_PREHASH for SHA-256-only TPM firmware 2026-10-15 08:26:38 -07:00
Tobias Frauenschläger
e70c246dd5 Build the session-cache-ref CI leg with opensslall
The SSL_SESSION_set1_id and set1_id_context regression test needs
OPENSSL_ALL as well as the client cache reference path. With
NO_SESSION_CACHE_REF now the configure default, the plain
--enable-opensslall legs no longer take the reference path. The
session-cache-ref leg is the only one left on it, and it built with
opensslextra only, so the test skipped everywhere. Adding
--enable-opensslall keeps it running.
2026-10-15 17:13:56 +02:00
philljj
b8db127813 Merge pull request #11746 from Frauschi/bench_hbs_verify_only
Benchmark LMS, XMSS and SLH-DSA in verify-only builds
2026-10-14 16:02:40 -05:00
Emma Stensland
c102b31fde Test the ML-DSA key caches after small-mem key regeneration 2026-10-14 13:48:09 -07:00
Emma Stensland
265e5e5fba Check the ML-DSA inverse NTT input bound in the small-mem UBSan runs 2026-10-14 13:48:09 -07:00
Emma Stensland
9b4d350750 Stop small-mem ML-DSA keygen reducing an unwritten accumulator 2026-10-14 13:48:09 -07:00
Emma Stensland
50491a51b4 Build ML-DSA small-mem under fault hardening in the stack-size run 2026-10-14 13:48:09 -07:00
Emma Stensland
aa6c5b7e69 Fix ML-DSA small-mem scratch alignment 2026-10-14 13:48:09 -07:00
Tobias Frauenschläger
61528edbd5 Build swdev on macOS
tests/swdev/Makefile localized every swdev symbol except the two entry
points with objcopy --keep-global-symbol, which macOS does not ship. On
Darwin, do the same with a second ld64 relocatable link and
-exported_symbol. The export check strips the Mach-O leading underscore
before comparing. The exported names now live in one SWDEV_EXPORTS list
that feeds both localization commands and the check.

The localization step is picked from configure's host_os rather than
uname, so cross-builds use the target's toolchain.

Add a macOS CI config that builds swdev with WOLF_CRYPTO_CB_ONLY_ED25519,
so make check depends on the ld64-localized swdev object.
2026-10-14 09:05:06 -07:00
philljj
fde1138bda Merge pull request #11367 from julek-wolfssl/chain-verify-cb
Add WOLFSSL_CHAIN_VERIFY_CB to replace peer chain verification
2026-10-14 10:16:45 -05:00
Tobias Frauenschläger
69291355b6 Benchmark SLH-DSA SHA2-128s verify in verify-only builds
The verify-only SLH-DSA benchmark only had a SHAKE-128s vector, because
that is the only verify-only signature in wolfcrypt/test/test.c. Builds
with only the SHA2 parameter sets showed no SLH-DSA row at all.

Add a SHA2-128s vector: a deterministic, empty-context signature of
"Hello World!" by the existing bench_slhdsa_sha2_128s_key.der. It was
generated with OpenSSL 4.0.3; wolfSSL verifies it, rejects it once a
message bit is flipped, and its own deterministic signature from the
same key is byte-identical. gen-slhdsa-mldsa-certs.sh gains the step
that produces it, and a rerun reproduces the committed files. The pq-all
verify-only benchmark config enables sha2 and requires this row too.

bench_slhdsa_verify() now takes the parameter set and vector. The row
uses the full benchmark's name, SLH-DSA-SHA2-S, and takes its strength
from the public key size, as the full benchmark does. Verify-only
builds accept -slhdsa-sha2-128s when SHA2-128s is built.

Tested on the host with --enable-slhdsa=yes,sha2,verify-only on its
own, with --enable-smallstack and with --disable-rng, with sha2 only,
with SHAKE only and 192f only (no SHA2 row, no warnings), and with the
full sha2 build.
2026-10-14 10:59:13 +02:00
Tobias Frauenschläger
cfdf7bb831 Benchmark LMS, XMSS and SLH-DSA verify in verify-only builds
The benchmark measured LMS, XMSS and SLH-DSA verify only after
generating a key and signing with it, so a build with
WOLFSSL_LMS_VERIFY_ONLY, WOLFSSL_XMSS_VERIFY_ONLY or
WOLFSSL_SLHDSA_VERIFY_ONLY compiled the algorithm out of the benchmark
entirely. Targets that only check signatures, such as a boot loader
verifying an image, got no numbers at all.

Verify-only builds now time verify against a fixed vector: LMS
L1_H10_W8, XMSS-SHA2_10_256 and SLH-DSA-SHAKE-128s. The vectors are the
verify-only KATs already in wolfcrypt/test/test.c, stored as binary
files under certs/lms, certs/xmss and certs/slhdsa and emitted into
certs_test.h by gencertbuf.pl. The rows use the same names as the full
benchmark, and a parameter set without a vector, or one that is not
compiled in, is skipped. If loading the key fails, the failing call is
printed and no row is shown.

In a verify-only build, -lms_hss, -xmss_xmssmt(_sha256),
-slhdsa-shake128s and -slhdsa are accepted only when their vector
applies, and the other XMSS and SLH-DSA parameter options are rejected,
so no option silently runs nothing.

Verify needs no RNG, so the asymmetric result printing is built
whenever one of these vectors applies, also with WC_NO_RNG. A
verify-only build with no vector no longer counts as an asymmetric
algorithm. This also fixes an LMS verify-only build with no other
asymmetric algorithm, which failed -Werror on master with an unused
bench_stats_asym_finish(). The SRTP-KDF, scrypt and Argon2 benchmarks
also call it, so it is now built for them too: on master each of them
failed to compile with no asymmetric algorithm, which an LMS
verify-only build used to hide.

The benchmark exits 0 even when verify fails, so a new pq-all CI config
builds all three verify-only with no other asymmetric algorithm and
-Werror=unused-function, runs the benchmark, and fails on any reported
benchmark error, such as a key that does not import, or on a missing
verify row.

Tested on the host with --enable-{lms,xmss,slhdsa}=yes,verify-only on
its own, with --enable-smallstack, with --disable-rng, and with
--enable-all-crypto; with edge configurations where no vector applies
(SLH-DSA 192f only, LMS max height 5, XMSS min hash size 512), both
with --disable-rng and with RNG but no other asymmetric algorithm; with
SRTP-KDF, scrypt or Argon2 as the only such user, with and without an
RNG and with LMS verify-only; and
with --enable-all and the full LMS/XMSS/SLH-DSA build, whose benchmark
output is unchanged. The new CI config passes under
parallel-make-check.py and fails with a corrupted signature byte, a
truncated public key, a missing row and an unused static function.
2026-10-14 10:59:13 +02:00
Tobias Frauenschläger
3699b3fbd0 Falcon: run the white-box with the 32-bit fpr shift helpers
The fpr shift helpers have a separate implementation for targets
without WC_64BIT_CPU, which no CI job built. Add a smallest-mem leg with
-DWC_32BIT_CPU so the white-box exercises it.
2026-10-14 09:15:37 +02:00
Tobias Frauenschläger
f60510d63b Falcon: keep the verify buffer off the stack
falcon_native_verify_msg placed its 2*n word16 working buffer on the stack
unless WOLFSSL_SMALL_STACK was set. That buffer is sized for the highest
enabled level, so a Falcon-512 verify used 4 KB of stack for it whenever
Falcon-1024 was built in, and verify reached about 5.7 KB of stack on a
Cortex-M33/M7 while keygen and sign stay near 1.2-1.4 KB.

Verify now allocates the buffer per call, sized for the key's own level
(2 KB for Falcon-512, 4 KB for Falcon-1024), so it can return MEMORY_E;
the wc_falcon_verify_msg documentation says so. WOLFSSL_NO_MALLOC builds
keep the buffer on the stack. To keep it off the stack without an
allocator, WOLFSSL_FALCON_VERIFY_NO_MALLOC
(--enable-falcon=verify-no-malloc) holds the buffer in falcon_key
instead, sized for the highest enabled level, the same approach as
WOLFSSL_MLDSA_VERIFY_NO_MALLOC. With it, a key verifies one signature at
a time and falcon_key grows by 4*FALCON_MAX_N bytes.

On an STM32H743 a Falcon-512 verify goes from 5648 B of stack and no heap
to 1568 B of stack and 2048 B of heap, at the same speed. The peak stack
of a TLS 1.3 handshake that verifies a Falcon-512 chain drops from 6.3 KB
to 3.7 KB.

The falcon-interop backend matrix gains verify-no-malloc and
level1+dynamic-keys+verify-no-malloc legs running the full unit suite.
2026-10-14 09:15:37 +02:00
David Garske
2f7c94fe7e sp: support ECC non-blocking for the large implementation with tables and windowing 2026-10-13 21:08:35 -07:00
night1rider
43a1f274b2 tests: cover the AES Direct crypto callback path, and build it in CI
Decline, fail, device result, device-owned key, no key, no device and find modes; aesofb in two cryptocb CI builds.
2026-10-13 16:13:51 -07:00
Paul Adelsbach
122d7ecc5d PR feedback: block GetKid when privKey is not set, add test case and entry for CI 2026-10-13 10:35:14 -07:00
Paul Adelsbach
aaf8741097 PR feedback: add tests for unavailable callback 2026-10-13 10:35:14 -07:00
Paul Adelsbach
01fe1f94ff Add CB_ONLY mode for LMS+XMSS, add swdev 2026-10-13 10:35:14 -07:00
philljj
83bca78b7b Merge pull request #11552 from Frauschi/fix-pha-client-cert-unload
Keep the client identity for post-handshake auth
2026-10-13 09:27:08 -05:00
Tobias Frauenschläger
46e7f0f661 Isolate the FIPS dev-no-POST make check runs with bwrap
fips-dev-no-post.yml runs seven configs through parallel-make-check.py,
four at a time, but never installed bubblewrap. The test scripts only
re-exec under bwrap --unshare-net when it is present, so every unit.test
shared the runner's network namespace.

test.h binds its listeners with SO_REUSEADDR and SO_REUSEPORT. With
those set, a Linux UDP bind to port 0 can return a port another process
already holds, and the DTLS server rebinds its port for each resumption.
A client's ClientHello can then reach another config's DTLS server,
which answers with a fatal alert, e.g. a DTLS 1.2 -r pair failing with
"wolfSSL_connect resume error -313" while every API test passed.

Install bubblewrap and lift the AppArmor userns restriction, as the
other parallel make check workflows already do. The job installs from
the ubuntu-24.04-linuxkm bundle, so add bubblewrap to its package set
too; until that bundle is rebuilt the job falls back to the apt mirror.
2026-10-13 12:35:50 +02:00
Juliusz Sosinowicz
b4e77e8951 Document what accepting means and re-check the callback's restrictions
Documentation:
- wolfSSL_get_verify_result() reports WOLFSSL_X509_V_OK once the callback
  accepts. wolfSSL verified nothing, so say that this records the
  callback's verdict rather than a check wolfSSL made.
- The OCSP stapling restriction is client-side. Both guards test
  side != WOLFSSL_SERVER_END: a server staples its own status, which is not
  part of verifying the peer. A server that asks the client to staple is
  not refused, and no stapled response is checked for it either, because
  ProcessPeerCertLeafRevocation is skipped with the callback.
- The list of what still applies was neither "two" nor complete. Add
  PEER_KEY_ERROR and SCR_DIFFERENT_CERT_E, note MAX_CERTIFICATE_SZ next to
  MAX_CHAIN_DEPTH, and state that 0 is the only accepting value, so
  returning WOLFSSL_SUCCESS rejects.
- DoChainVerifyCb no longer allocates; drop MEMORY_E from its comment.

Code:
- NULL-check the certificate manager in ChainVerifyCbCheckSsl, as
  ChainVerifyCbCheckCtx already does for ctx->cm.
- Re-run ChainVerifyCbCheckSsl in TLS_ASYNC_BUILD. A deferred verdict
  resumes there, so TLS_ASYNC_BEGIN ran on the first pass only.

Tests:
- Pin both halves of the headline contract on the accept path: the verify
  callback set with wolfSSL_set_verify() is not called, and
  wolfSSL_get_verify_result() reports WOLFSSL_X509_V_OK.
- Cover a callback returning WOLFSSL_SUCCESS, which rejects.
- Rename test_tls13_chain_verify_cb_async to _defer. It exercises deferral
  over TLS 1.3, not async crypto.

CI:
- Add chain-verify-cb-async, the first build combining the callback with
  WOLFSSL_ASYNC_CRYPT, and the only one with async crypt and CRL but
  without WOLFSSL_NONBLOCK_OCSP.

Three behaviour changes to existing configurations, introduced earlier in
this series and not called out until now:
- IsHsSuspendErr() recognizes OCSP_WANT_READ only under
  WOLFSSL_NONBLOCK_OCSP, where the sites it replaced tested
  WOLFSSL_ASYNC_CRYPT || WOLFSSL_NONBLOCK_OCSP. The keep-state re-entry
  branch it replaced was itself under WOLFSSL_NONBLOCK_OCSP, so an
  async-only build rewound into reset args and a freed pendingMsg. It now
  fails cleanly instead.
- DoCertificate no longer advances serverState to SERVER_CERT_COMPLETE
  when ProcessPeerCerts suspended.
- ReceiveData admits a suspended handshake error rather than refusing the
  read, which under WOLFSSL_NONBLOCK_OCSP now includes OCSP_WANT_READ.
2026-10-13 05:25:00 +00:00
Juliusz Sosinowicz
797e34a271 Add WOLFSSL_CHAIN_VERIFY_CB to replace peer chain verification
Adds an opt-in callback that takes over the peer certificate trust
decision. wolfSSL builds no chain, verifies no signature and checks no
date, revocation status, key usage or host name; the verify callback is
not called either. The callback gets only the DER certificates from the
Certificate message as WOLFSSL_BUFFER_INFO entries, certs[0] first. It
is consulted even under WOLFSSL_VERIFY_NONE, and its rejection fails the
handshake either way.

wolfSSL still decodes every certificate with ParseCert(NO_VERIFY) before
the callback runs, so malformed DER fails the handshake and the callback
is never handed it. Content wolfSSL does not understand - an unknown
critical extension, an unsupported key or signature algorithm, a
signature algorithm mismatch - is not a decoding failure and is left for
the callback to judge. The check runs once, not again on re-entry after
a deferred verdict.

The callback may return CHAIN_VERIFY_WANT_E to suspend the handshake and
be asked again with the same certificates when the application re-enters
wolfSSL_connect(), wolfSSL_accept(), wolfSSL_read() or wolfSSL_write().
A certificate received after the handshake (TLS 1.3 post-handshake
authentication) arrives inside wolfSSL_read() and is resumed by reading
again: ReceiveData() re-enters on any handshake-suspend error, and the
ticket-sent accept state leaves a suspended message alone. Rejection
fails with CHAIN_VERIFY_CB_E and one bad_certificate alert, and sets
peerVerifyRet so wolfSSL_get_verify_result() does not report X509_V_OK.

Still applied: an empty Certificate message keeps the existing
mutual-auth policy (the callback is not called for it), and the minimum
peer key sizes still gate the peer's own key, which the handshake uses
directly.

DTLS, raw public keys and OCSP stapling are not supported with the
callback. wolfSSL_CTX_SetChainVerifyCb() and wolfSSL_SetChainVerifyCb()
refuse with CHAIN_VERIFY_UNSUPPORTED_E when the context or object is
already configured for one of them, and a connection that uses one of
them anyway fails with the same error and an internal_error alert before
the callback is called. The DTLS paths are otherwise untouched.

The callback and its user context can be set on the context or on the
SSL object, the object's taking precedence. The feature is part of
--enable-all, has a CMake option and Doxygen entries.

The suspend machinery is shared with WOLFSSL_NONBLOCK_OCSP and
WOLFSSL_ASYNC_CRYPT. The open-coded pairs of comparisons against
WC_PENDING_E and OCSP_WANT_READ are replaced by IsHsSuspendErr(), and the
matching build guards by WOLFSSL_HAVE_HS_SUSPEND. That also closes three
holes which affected WOLFSSL_NONBLOCK_OCSP builds:

 - DoHandShakeMsg() freed ssl->pendingMsg on a non-WC_PENDING_E suspend
   while ProcPeerCertArgs still pointed into it.
 - wolfSSL_connect()/wolfSSL_accept() and their TLS 1.3 counterparts
   called FreeAsyncCtx() when buffered output flushed, discarding the
   saved certificate state.
 - ProcessPeerCerts() XFREE'd args in WOLFSSL_SMALL_STACK builds without
   WOLFSSL_ASYNC_CRYPT, where args points inside ssl->async.
2026-10-13 05:24:59 +00:00
Tobias Frauenschläger
229051446c Keep the client identity for post-handshake auth
FreeHandshakeResources() unloads SSL-owned certificates and keys once
the handshake is done. The side check that limits this to the server
was compiled out when WOLFSSL_POST_HANDSHAKE_AUTH is defined, so a PHA
build unloaded the client's identity too, which is the side that needs
it to answer a post-handshake CertificateRequest. The client then sent
an empty Certificate and the server failed with NO_PEER_CERT, or
carried on unauthenticated when it did not require a certificate.

This hits TLS 1.3 clients that load their certificate and key on the
WOLFSSL object in builds with post-handshake auth but without
OPENSSL_EXTRA or WOLFSSL_WPAS_SMALL, both of which compile the unload
out. Identities loaded on the CTX are not owned by the SSL and were
never unloaded. A client that authenticated during the handshake was
hit as well on the first post-handshake request.

Unload on the server only, in every configuration.

test_tls13_pha stopped at wolfSSL_request_certificate() and never ran
the exchange. It now drives two post-handshake rounds to completion,
after an initial handshake with and without client auth, with the
client identity on the SSL. Both cases fail with NO_PEER_CERT without
the fix in a build with --enable-postauth and without OPENSSL_EXTRA.

Add a postauth-no-compat entry to the Linux os-check matrix, so a
GitHub Actions build runs the test with the unload compiled in;
--enable-all brings OPENSSL_EXTRA along and compiles it out.
2026-10-12 20:16:40 +02:00
David Garske
f99453320f Merge pull request #11042 from aidangarske/agilex5-fcs-port
Add Altera Agilex 5 SDM crypto offload port
2026-10-12 08:25:33 -07:00
Sean Parkinson
823283d609 RSA/ECC: no software builds
SE050 and CryptoCell are supported with this.
WOLFSSL_NO_RSA_SW to disable the RSA software implementation.
WOLFSSL_NO_ECC_SW to disable the ECC software implementation.
2026-10-12 11:47:02 +10:00
philljj
26215ab947 Merge pull request #11681 from padelsbach/ci-zephyr-apt
CI: Zephyr: remove unneeded apt install
2026-10-08 20:45:09 -05:00