Add TLS, HTTPS, SSH, and MQTT support for STM32H563 port#14
Merged
danielinux merged 6 commits intowolfSSL:masterfrom Jan 27, 2026
Merged
Add TLS, HTTPS, SSH, and MQTT support for STM32H563 port#14danielinux merged 6 commits intowolfSSL:masterfrom
danielinux merged 6 commits intowolfSSL:masterfrom
Conversation
- Add wolfSSL TLS 1.3 integration with wolfIP TCP/IP stack - TLS server: echo server on port 8443 with ECC P-256 certificate - TLS client: connects to Google (HTTPS) to verify outbound TLS - Uses ECDHE-P256 key exchange, RSA cert verification, AES-GCM/ChaCha20 - Custom I/O callbacks in wolfssl_io.c bridge wolfSSL and wolfIP - Build with: make ENABLE_TLS=1 - ~200KB code size with full TLS support - Tested: TLS 1.3 handshake to google.com successful
STM32H563 - Add HTTPS server serving status page on port 443 (ENABLE_HTTPS=1) - Add SSH server with interactive shell on port 22 (ENABLE_SSH=1) - Add wolfssh_io.c for wolfSSH-wolfIP integration - Increase MAX_TCPSOCKETS from 4 to 8 to support multiple servers - Fix IP address byte order display in HTTPS status page - Update Makefile with ENABLE_HTTPS and ENABLE_SSH build flags - Update README with build and testing documentation
Commit Body: Fix wolfSSH integration and optimize memory for embedded deployment. wolfSSH API updates: - Add wolfSSH_CTX_SetIO_wolfIP() for context-level I/O callbacks - Update field names: usernameLen->usernameSz, passwordLen->passwordSz - Wrap debug logging callback in #ifdef DEBUG_WOLFSSH Memory optimization for STM32H563 (640KB SRAM): - Reduce wolfSSH window size from 16KB to 4KB - Reduce wolfIP RX/TX buffers from 16x to 8x MTU - Reduce MAX_TCPSOCKETS to 6, MAX_ICMPSOCKETS to 1 wolfSSL/wolfSSH configuration: - Add WOLFSSL_WOLFSSH for wc_SSH_KDF support - Add WOLFSSL_KEY_GEN for host key generation - Add WOLFSSH_NO_TERM for bare-metal operation Build system: - Add signature.c for SSH signature verification - Fix pattern rules for wolfSSH compilation Tested: SSH login (admin/wolfip), shell commands working
- Add mqtt_client.c/h: Non-blocking MQTT client with state machine
(IDLE -> CONNECTING -> TLS -> MQTT_CONNECT -> CONNECTED)
- Add wolfmqtt_io.c: I/O glue layer for wolfIP sockets
- Update Makefile: Add ENABLE_MQTT build option and wolfMQTT sources
- Update user_settings.h: Add wolfMQTT configuration (WOLFMQTT_NONBLOCK,
WOLFMQTT_USER_IO, WOLFMQTT_NO_STDIO, EWOULDBLOCK/EAGAIN defines)
- Update main.c: Integrate MQTT client into main loop with periodic
status publishing
- Update README.md: Add MQTT documentation section
Features:
- TLS 1.3 encrypted connection to MQTT broker (port 8883)
- Connects to test.mosquitto.org by default
- Publishes status messages to wolfip/status topic
- QoS 0 (fire and forget) for minimal overhead
- 60 second keep-alive
Build: make ENABLE_TLS=1 ENABLE_MQTT=1
dgarske
approved these changes
Jan 22, 2026
danielinux
approved these changes
Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds secure communication capabilities to the STM32H563 bare-metal port using wolfSSL,
wolfSSH, and wolfMQTT libraries.
Features
TLS 1.3 Support
HTTPS Web Server
SSH Server
MQTT Client
Build Options
New Files
tls_server.c/h, tls_client.c/h- TLS implementationssh_server.c/h- SSH shell servermqtt_client.c/h- MQTT clientwolfssl_io.c, wolfssh_io.c, wolfmqtt_io.c- I/O glue layers for wolfIPcerts.h, ssh_keys.h- Embedded test certificates/keys-
user_settings.h- wolfSSL/wolfSSH/wolfMQTT configurationTesting
All features tested on
NUCLEO-H563ZIwith DHCP network configuration.Also tested and verified
TZEN=1is working with basic wolfIP stackDocs
src/port/stm32h563/README.md