Kaleb J. Himes wrote:Hi thivya_ashok,
If not already doing so could you try calling this API before wolfSSL_CTX_set_cipher_list:
wolfSSL_CTX_allow_anon_cipher(ctx);
See an example here:
https://github.com/wolfSSL/wolfssl/blob … nt.c#L1542
Let me know your results.
Warm Regards,
Kaleb
Kaleb,
I had already included the API you had suggested but no luck. Here is the code snippet from net_pres_enc_glue.c, where the wolfssl CTX is created:
if (_net_pres_wolfsslUsers == 0)
{
wolfSSL_Init();
wolfSSL_SetLoggingCb(NET_PRES_EncProviderStreamServerLog0);
wolfSSL_Debugging_ON();
_net_pres_wolfsslUsers++;
}
net_pres_wolfSSLInfoStreamServer0.transObject = transObject;
net_pres_wolfSSLInfoStreamServer0.context = wolfSSL_CTX_new(wolfSSLv23_server_method());
if (net_pres_wolfSSLInfoStreamServer0.context == 0)
{
return false;
}
wolfSSL_CTX_allow_anon_cipher(net_pres_wolfSSLInfoStreamServer0.context);
wolfSSL_CTX_set_cipher_list(net_pres_wolfSSLInfoStreamServer0.context, "ADH-AES128-SHA");
wolfSSL_SetIORecv(net_pres_wolfSSLInfoStreamServer0.context, (CallbackIORecv)&NET_PRES_EncGlue_StreamServerReceiveCb0);
wolfSSL_SetIOSend(net_pres_wolfSSLInfoStreamServer0.context, (CallbackIOSend)&NET_PRES_EncGlue_StreamServerSendCb0);
if (wolfSSL_CTX_use_certificate_buffer(net_pres_wolfSSLInfoStreamServer0.context, serverCertPtr, serverCertLen, SSL_FILETYPE_ASN1) != SSL_SUCCESS)
{
wolfSSL_CTX_free(net_pres_wolfSSLInfoStreamServer0.context);
return false;
}
It's really weird that I'm able to use the cipher suite when I run the standalone wolfSSL on Linux but not the one integrated with MPLAB.
Is the cipher suite accessible in the MPLAB.X project at your end?