1 (edited by yighax2 2020-03-01 08:33:48)

Topic: [SOLVED] TLS connection using usb serial

Hi,
i'd like to ask, if there are any examples (github, etc) of tls connection using usb serial.
I searched in section "wolfssl examples", but didn't find any.
Thanks.

Share

Re: [SOLVED] TLS connection using usb serial

Hi yighax2,

Check out our wolfssl-examples repo. We have a few examples that will help you with this:

https://github.com/wolfSSL/wolfssl-exam … -callbacks
https://github.com/wolfSSL/wolfssl-exam … master/tls
See the "-callback" TLS examples

These use our custom IO callbacks, which are set using:
wolfSSL_CTX_SetIORecv(ctx, my_IORecv);
wolfSSL_CTX_SetIOSend(ctx, my_IOSend);

You can also set a custom pointer context using:
wolfSSL_SetIOReadCtx(ssl, &recvCtx);
wolfSSL_SetIOWriteCtx(ssl, &sendCtx);

You can build with `WOLFSSL_USER_IO` to disable the internal "socket" handling and require use of these IO callbacks.

Thanks,
David Garske, wolfSSL

Share