Also, I define the custom I/O callback, because I do not use TCP and ...
I use these functions for defining the callbacks
wolfSSL_CTX_SetIORecv(ctx, my_IORecv);
wolfSSL_CTX_SetIOSend(ctx, my_IOSend);
int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
After that, I use wolfSSL_connect(ssl). The my_IOSend(...) is called. I check, the paraments that are passed to the my_IOSend, like buff and sz, but I become so confused:
I get sz = 121, but the buff is þý. The debugging log as this:
ŽwolfSSL Entering DTLS_client_method_ex
wolfSSL Entering wolfSSL_CTX_new_ex
wolfSSL Entering wolfSSL_CertManagerNew
wolfSSL Leaving WOLFSSL_CTX_new, return 0
Hello.
wolfSSL Entering SSL_CTX_set_psk_client_callback
wolfSSL Entering SSL_new
wolfSSL Leaving SSL_new, return 0
SSL session has been configured to use DTLS
DHE-PSK-AES128-CBC-SHA256
DHE-RSA-AES128-SHA256
DHE-RSA-AES256-SHA256
DHE-RSA-AES128-GCM-SHA256
ECDHE-RSA-AES128-GCM-SHA256
ECDHE-ECDSA-AES128-GCM-SHA256
ECDHE-RSA-AES128-SHA256
ECDHE-ECDSA-AES128-SHA256
ECDHE-PSK-AES128-CBC-SHA256
wolfSSL Entering SSL_connect()
wolfSSL Entering SendClientHello
Adding signature algorithms extension
growing output buffer
Signature Algorithms extension to write
Point Formats extension to write
Supported Groups extension to write
Encrypt-Then-Mac extension to write
EMS extension to write
wolfSSL Entering DtlsMsgPoolSave()
wolfSSL Entering DtlsMsgNew()
wolfSSL Leaving DtlsMsgPoolSave(), return 0
þý
sz 121
is it correct?