Skip to content

Commit

Permalink
Fix MQTT wolfssl demo, add wolfssl config WOLFSSL_ALT_CERT_CHAINS
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-josi-aws committed Apr 25, 2024
1 parent 97b800e commit e31f0d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit e31f0d7

Please sign in to comment.