diff --git a/FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth_wolfSSL/user_settings.h b/FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth_wolfSSL/user_settings.h index fc077b7a50..a95f37ed0c 100644 --- a/FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth_wolfSSL/user_settings.h +++ b/FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth_wolfSSL/user_settings.h @@ -103,6 +103,8 @@ #define NO_MD4 #define NO_PWDBASED +#define WOLFSSL_ALT_CERT_CHAINS + /*-- Debugging options ------------------------------------------------------ * * "DEBUG_WOLFSSL" definition enables log to output into stdout. diff --git a/FreeRTOS-Plus/Source/Application-Protocols/network_transport/transport_wolfSSL.c b/FreeRTOS-Plus/Source/Application-Protocols/network_transport/transport_wolfSSL.c index 847dcf0382..d5d70da109 100644 --- a/FreeRTOS-Plus/Source/Application-Protocols/network_transport/transport_wolfSSL.c +++ b/FreeRTOS-Plus/Source/Application-Protocols/network_transport/transport_wolfSSL.c @@ -143,11 +143,11 @@ static int wolfSSL_IORecvGlue( WOLFSSL * ssl, read = TCP_Sockets_Recv( xSocket, ( void * ) buf, ( size_t ) sz ); if( ( read == 0 ) || - ( read == -TCP_SOCKETS_ERRNO_EWOULDBLOCK ) ) + ( read == TCP_SOCKETS_ERRNO_EWOULDBLOCK ) ) { read = WOLFSSL_CBIO_ERR_WANT_READ; } - else if( read == -TCP_SOCKETS_ERRNO_ENOTCONN ) + else if( read == TCP_SOCKETS_ERRNO_ENOTCONN ) { read = WOLFSSL_CBIO_ERR_CONN_CLOSE; } @@ -169,11 +169,11 @@ static int wolfSSL_IOSendGlue( WOLFSSL * ssl, Socket_t xSocket = ( Socket_t ) context; BaseType_t sent = TCP_Sockets_Send( xSocket, ( void * ) buf, ( size_t ) sz ); - if( sent == -TCP_SOCKETS_ERRNO_EWOULDBLOCK ) + if( sent == TCP_SOCKETS_ERRNO_EWOULDBLOCK ) { sent = WOLFSSL_CBIO_ERR_WANT_WRITE; } - else if( sent == -TCP_SOCKETS_ERRNO_ENOTCONN ) + else if( sent == TCP_SOCKETS_ERRNO_ENOTCONN ) { sent = WOLFSSL_CBIO_ERR_CONN_CLOSE; }