wolfssl-examples/ESP32/DTLS13-wifi-station-server
gojimmypi 660590a851 Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
..
VisualGDB Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
components/wolfssl Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
main Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
CMakeLists.txt Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
CMakeLists.txt.bak Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
README.md Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
partitions_singleapp_large.csv Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
partitions_singleapp_large.csv.bak Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
sdkconfig.current.bak Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
sdkconfig.defaults Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00
sdkconfig.defaults.bak Initial ESP32 DTLS 1.3 client and server examples 2023-09-06 16:02:17 -07:00

README.md

wolfSSL DTLS1.3 Project

This is an example minimally viable wolfSSL template to get started with your own project.

Prerequisites

It is assumed the ESP-IDF environment has been installed.

gcc -o client-dtls13 client-dtls13.c -L/mnt/c/workspace/wolfssl-gojimmypi/src/.libs -I/mnt/c/workspace/wolfssl-gojimmypi/ -I/mnt/c/workspace/wolfssl-gojimmypi/include -DWOLFSSL_TLS13 -DWOLFSSL_DTLS -DWOLFSSL_DTLS13 -DWOLFSSL_USER_SETTINGS -lwolfssl -ldl -lm

Connect with Linux command line example:

# assuming wolfssl is in /workspace/wolfssl-$USER
cd /mnt/c/workspace/wolfssl-$USER
./autogen.sh
./configure --enable-dtls --enable-dtls13 --enable-tls13
make
./examples/dtls13client/client 192.168.1.37
./configure --enable-dtls --enable-dtls13 --enable-tls13 --enable-sm3 --enable-sm4-gcm --enable-sm2
make
./examples/dtls13client/client 192.168.1.37

Testing TLS 1.3 SM:

./examples/server/server -v 4 -l TLS13-SM4-GCM-SM3 \
    -c ./certs/sm2/server-sm2.pem -k ./certs/sm2/server-sm2-priv.pem \
    -A ./certs/sm2/client-sm2.pem -V &
./examples/client/client -v 4 -l TLS13-SM4-GCM-SM3 \
    -c ./certs/sm2/client-sm2.pem -k ./certs/sm2/client-sm2-priv.pem \
    -A ./certs/sm2/root-sm2.pem -C

Files Included

set(WOLFSSL_ROOT "~/workspace/wolfssl-other-source")

Getting Started:

Here's an example using the command-line idf.py.

Edit your WRK_IDF_PATHto point to your ESP-IDF install directory.

cd /mnt/C/workspace/wolfssl-gojimmypi/IDE/Espressif/ESP-IDF5/examples/wolfssl_dtls13_server

WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.1

echo "Run export.sh from ${WRK_IDF_PATH}"
. ${WRK_IDF_PATH}/export.sh

# build the example:
idf.py build

# flash the code onto the serial device at /dev/ttyS19
idf.py flash -p /dev/ttyS19 -b 115200

# build, flash, and view UART output with one command:
idf.py flash -p /dev/ttyS19 -b 115200 monitor

# erase 
idf.py erase-flash -p /dev/ttyS9 -b 115200

# save defaults
idf.py save-defconfig

Press Ctrl+] to exit idf.py monitor. See additional monitor keyboard commands.

Other Examples:

For examples, see: