[riot-notifications] [RIOT-OS/RIOT] wolfSSL pkg addition with examples (#10308)
notifications at github.com
Thu Jul 25 21:18:06 CEST 2019
Thanks for adding the fixes. I tried again with `examples/wolfssl_server` and `examples/wolfssl_client`.
The server crashes for me on native:
RIOT native interrupts/signals initialized.
RIOT native board initialized.
RIOT native hardware initialization complete.
main(): This is RIOT! (Version: 2019.07-devel-607-gcd5c1-prtest_10308_wolfssl)
This is the wolfSSL Server!
Server is running on 127.0.0.1 and listening on port 11111
make: *** [/home/michel/devel/wolfssl/RIOT/examples/wolfssl_server/../../Makefile.include:558: term] Segmentation fault (core dumped)
Coming from the main the crash happens in the `wolfSSL_CTX_use_PrivateKey_buffer` function.
Here is a gdb backtrace of the crash:
#0 0xf7d61ad4 in free () from /usr/lib32/libc.so.6
#1 0x5655911f in free (ptr=0xfaf414a4) at /home/michel/devel/wolfssl/RIOT/cpu/native/syscalls.c:175
#2 0x5657f894 in wc_RsaCleanup (key=0x565c3130) at /home/michel/devel/wolfssl/RIOT/examples/wolfssl_server/bin/pkg/native/wolfssl/wolfcrypt/src/rsa.c:241
#3 0x5657fa69 in wc_FreeRsaKey (key=0x565c3130) at /home/michel/devel/wolfssl/RIOT/examples/wolfssl_server/bin/pkg/native/wolfssl/wolfcrypt/src/rsa.c:520
#4 0x5655f88b in ProcessBuffer (ctx=0x565c2170, buff=0x5659e5a0 <server_key_der_2048> "0\202\004\245\002\001", sz=1193, format=2, type=1, ssl=0x0, used=0x0, userChain=0)
#5 0x56560f1c in wolfSSL_CTX_use_PrivateKey_buffer (ctx=0x565c2170, in=0x5659e5a0 <server_key_der_2048> "0\202\004\245\002\001", sz=1193, format=2)
#6 0x56558065 in main () at /home/michel/devel/wolfssl/RIOT/examples/wolfssl_server/main.c:117
For arm-none-eabi targets I can't compile. Removing strnlen or adding `#define _DEFAULT_SOURCE 1` at the top of main.c could be used to solve this.
To actually enable radio support on platforms that come with a radio `USEMODULE += netdev_default` should be added to the Makefile. For 802.15.4 radios this wont work with the default `LWIP_IPV4 = 1` setting. Though, overwriting actually doesn't make a difference for the application as values like the IP are hardcoded in v4 style and calls to `socket(AF_INET, ...)` etc. all use `..INET` instead of `..INET6`.
Did you try these examples on an MCU platform? Because if these examples will only work on native anyway, I don't think we should keep them. Which MCU-platform did you use for running these examples?
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications