1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/examples/dtls-wolfssl
Karl Fessel 9a2ccd51f4 examples: add missing includes
thread.h
    gnrc/netif.h
2022-02-28 14:53:08 +01:00
..
cert.c wolfSSL pkg: new set of examples and tests 2019-09-11 08:12:50 +02:00
dtls-client.c examples: add missing includes 2022-02-28 14:53:08 +01:00
dtls-server.c examples/dtls-wolfssl: cleanup output messages 2020-02-28 08:23:43 +01:00
main.c treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Makefile treewide: replace gnrc_netdev_default with netdev_default 2021-09-06 15:43:40 +02:00
Makefile.ci boards/calliope-mini: add nrf51 common dependencies 2021-11-26 08:48:23 +01:00
README.md wolfSSL pkg: new set of examples and tests 2019-09-11 08:12:50 +02:00

dtls_wolfssl example

This example shows how to use DTLS with wolfSSL

SOCK vs. Socket

This example is configured to use socks instead of sockets (over GNRC). It's possible to use POSIX sockets, which give a more similar approach to the UNIX version of wolfSSL. POSIX sockets are supported by RIOT-OS via lwIP, but no example is available at this time.

Fast configuration (Between RIOT instances)

Prepare the bridge interface linking two tuntap

    ./../../dist/tools/tapsetup/tapsetup --create 2

Testing

Run the server

$ make all; PORT=tap1 make term
> ifconfig

copy the server address

> dtlss

Run the client

$ PORT=tap0 make term
> dtlsc <IPv6's server address[%netif]>

Certificate/key

Test certificate and key arrays are provided in cert.c. You can generate your own arrays starting from existing certificate and key in .der format using xxd -i.

Testing against host endpoints

Riot-to-host can be tested against the DTLS examples provided in the wolfSSL-examples repository.

Boards

Boards that due to insufficient memory are not able to support GNRC are included in the BOARD_INSUFFICIENT_MEMORY.