Skip to content

zephyr: changes needed for Zephyr 4.3 default TLS support#10268

Merged
JacobBarthelmeh merged 2 commits intowolfSSL:masterfrom
ColtonWilley:zephyr-4.3-default-tls-support
Apr 24, 2026
Merged

zephyr: changes needed for Zephyr 4.3 default TLS support#10268
JacobBarthelmeh merged 2 commits intowolfSSL:masterfrom
ColtonWilley:zephyr-4.3-default-tls-support

Conversation

@ColtonWilley
Copy link
Copy Markdown
Contributor

Follow-up to #7731. Zephyr 4.3's TLS socket integration uses three additional
wolfSSL features plus an extension to the native_sim time-source gates
introduced in #7731.

native_sim timer gates (src/internal.c, wolfcrypt/src/wc_port.c):
Extend !CONFIG_BOARD_NATIVE_POSIX gates in LowResTimer() and z_time() RTC
path to also cover CONFIG_BOARD_NATIVE_SIM. Zephyr 4.3 renamed the simulator
board. Behavior on native_posix is unchanged.

New Kconfig options (zephyr/Kconfig, zephyr/user_settings.h):
CONFIG_WOLFSSL_SESSION_EXPORT -> HAVE_EXT_CACHE
CONFIG_WOLFSSL_KEEP_PEER_CERT -> KEEP_PEER_CERT
CONFIG_WOLFSSL_ALWAYS_VERIFY_CB -> WOLFSSL_ALWAYS_VERIFY_CB

All default-off. Customers opt in the same way as CONFIG_WOLFSSL_DTLS / ALPN / PSK.

.wolfssl_known_macro_extras: register HAVE_EXT_CACHE (new use in zephyr/user_settings.h).

Companion OSP patch for Zephyr 4.3 will follow in wolfSSL/osp and depends on this PR.

Follow-up to wolfSSL#7731 ("Changes needed for default TLS support in zephyr
kernel"). Zephyr 4.3's TLS socket integration uses three additional
wolfSSL features that were not needed by the 3.7 integration, plus an
extension to the native_sim time-source gates introduced in wolfSSL#7731.

native_sim timer gates (src/internal.c, wolfcrypt/src/wc_port.c):
  Extend the !CONFIG_BOARD_NATIVE_POSIX gate in LowResTimer() and the
  CONFIG_BOARD_NATIVE_POSIX RTC path in z_time() to also cover
  CONFIG_BOARD_NATIVE_SIM. Zephyr 4.3 renamed the simulator board from
  native_posix to native_sim; without this, k_cpu_idle() on native_sim
  advances simulated time during DTLS retransmit loops and the RTC path
  falls through to uptime-since-boot. Behavior on native_posix is
  unchanged.

New Kconfig options (zephyr/Kconfig, zephyr/user_settings.h):
  CONFIG_WOLFSSL_SESSION_EXPORT   -> HAVE_EXT_CACHE
    Required by consumers that serialize TLS session state across
    connections via wolfSSL_i2d_SSL_SESSION / wolfSSL_d2i_SSL_SESSION.
  CONFIG_WOLFSSL_KEEP_PEER_CERT   -> KEEP_PEER_CERT
    Retain the peer certificate after handshake so the application
    layer can inspect it via wolfSSL_get_peer_certificate.
  CONFIG_WOLFSSL_ALWAYS_VERIFY_CB -> WOLFSSL_ALWAYS_VERIFY_CB
    Invoke an application-set verify callback on successful chain
    validation in addition to validation failures.

All three are default-off; customers opt in the same way they do for
the existing CONFIG_WOLFSSL_DTLS / ALPN / PSK feature options.

.wolfssl_known_macro_extras: register HAVE_EXT_CACHE.
@ColtonWilley ColtonWilley requested a review from Frauschi April 21, 2026 01:21
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

MemBrowse Memory Report

gcc-arm-cortex-m4

  • FLASH: .rodata.CSWTCH.1 +24 B, .rodata.str1.1 +151 B, .rodata.wolfSSL_ERR_reason_error_string.str1.1 +29 B, .text +192 B (+0.2%, 195,799 B / 262,144 B, total: 75% used)

gcc-arm-cortex-m4-baremetal

  • FLASH: .text +128 B (+0.2%, 63,667 B / 262,144 B, total: 24% used)

gcc-arm-cortex-m4-min-ecc

  • FLASH: .text +64 B (+0.1%, 59,253 B / 262,144 B, total: 23% used)

gcc-arm-cortex-m4-tls12

  • FLASH: .text +128 B (+0.1%, 119,610 B / 262,144 B, total: 46% used)

Frauschi
Frauschi previously approved these changes Apr 21, 2026
@ColtonWilley
Copy link
Copy Markdown
Contributor Author

ColtonWilley commented Apr 23, 2026

Jenkins retest this please

@JacobBarthelmeh JacobBarthelmeh merged commit 46cedcf into wolfSSL:master Apr 24, 2026
461 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants