Fix MQTT wolfssl demo, add wolfssl config WOLFSSL_ALT_CERT_CHAINS (#1217)

This commit is contained in:
Tony Josi
2024-04-26 09:55:32 +05:30
committed by GitHub
parent 97b800e339
commit 8f3277f7eb
2 changed files with 6 additions and 4 deletions

View File

@@ -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.

View File

@@ -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;
}