Added example for RIOT-OS using lwIP POSIX sockets#252
Added example for RIOT-OS using lwIP POSIX sockets#252dgarske merged 2 commits intowolfSSL:masterfrom
Conversation
| wolfSSL_Init(); | ||
|
|
||
| /* Create and initialize WOLFSSL_CTX */ | ||
| if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) { |
There was a problem hiding this comment.
TLS1.3 can be switched on by adding USEMODULE+=wolfssl_tls13 to the makefile.
TLS1.3 in RIOT depends on sock_tls, I've submitted a PR to remove this forced dependency and make TLS1.3 available for POSIX/lwIP sockets.
dgarske
left a comment
There was a problem hiding this comment.
Awesome job! Just a few minor notes (as we discussed).
| APPLICATION = posix-tls | ||
|
|
||
| # This has to be the absolute path to the RIOT base directory: | ||
| RIOTBASE ?= $(CURDIR)/../RIOT |
There was a problem hiding this comment.
Might be easier out of the box experience using RIOTBASE ?= $(CURDIR)/../../RIOT. That allows wolfssl-examples and RIOT to be side by side.
There was a problem hiding this comment.
Makes sense, fixed. Thanks!
|
|
||
| ### Run the server | ||
| ```bash | ||
| $ make all RIOTBASE=/path/to/riot-os; PORT=tap1 make term |
There was a problem hiding this comment.
Had issue on Ubuntu. Needed to install sudo apt-get install gcc-multilib.
There was a problem hiding this comment.
On the PORT=tap1 make term I needed to add sudo. Got:
RIOT TLS testing implementation
/home/davidgarske/GitHub/wolfssl-examples/riot-os-posix-lwip/bin/native/posix-tls.elf: ioctl TUNSETIFF: Operation not permitted
/home/davidgarske/GitHub/wolfssl-examples/riot-os-posix-lwip/bin/native/posix-tls.elf: probably the tap interface (tap1) does not exist or is already in use
make: *** [/home/davidgarske/GitHub/wolfssl-examples/riot-os-posix-lwip/../../RIOT/Makefile.include:749: term] Error 1
Otherwise chmod /dev/net/tune as you said.. Might be good to add note.
There was a problem hiding this comment.
Added info about pre-requisites and tuntap usage to the README.md.
| ### Run the server | ||
| ```bash | ||
| $ make all RIOTBASE=/path/to/riot-os; PORT=tap1 make term | ||
| > ip |
There was a problem hiding this comment.
No "ip" command for me? Just "ifconfig", which shows:
> ifconfig
ifconfig
lo_01:
ET_00:
There was a problem hiding this comment.
Removed confusing section from README (valid only with LWIP_IPV6 configuration)
Added example for RIOT-OS using lwIP POSIX sockets
No description provided.