Topic: cyassl_io.c...and...CYASSL_USER_IO defined
If i'm not mistaken, CYASSL_USER_IO needs to be defined in non-standard environment. Will you please elaborate what I need to implement when defining this flag?
You are not logged in. Please login or register.
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferenceswolfSSL - Embedded SSL Library → wolfSSL → cyassl_io.c...and...CYASSL_USER_IO defined
If i'm not mistaken, CYASSL_USER_IO needs to be defined in non-standard environment. Will you please elaborate what I need to implement when defining this flag?
Basically two functions:
1) Your Network Send function.
2) Your Network Receive function.
They are prototyped by CallbackIOSend and CallbackIORecv in ssl.h. You then have to register these functions per SSL_CTX with CyaSSL_SetIOSend() and CyaSSL_SetIORecv(). It's probably easiest to put your functions at the bottom of cyassl_io.c.
Each SSL object can then register the actual context per session with CyaSSL_SetIOWriteCtx() and CyaSSL_SetIOReadCtx(). The default case, no user overrides, registers the socket as the context.
You can use the default Send() and Receive() functions, EmbedSend() and EmbedRecv(), as templates when writing your own. Look at the enum IOErrors for the error cases that may need to be returned, return IO_ERR_GENERAL when in doubt.
i'm finally back to this portion of your embedded SSL code (network stack calls). I thought you should know that the flag "CYASSL_USER_IO" isn't mentioned anywhere on the site or in documentation. I had stumbled on it in the code...there maybe more questions coming
wolfSSL - Embedded SSL Library → wolfSSL → cyassl_io.c...and...CYASSL_USER_IO defined
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.018 seconds (92% PHP - 8% DB) with 11 queries