Skip to content

Commit

Permalink
platform,posix,mbedtls: Fix typo in code (#1861)
Browse files Browse the repository at this point in the history
Change logic AND to logic OR.
  • Loading branch information
szsam authored Apr 3, 2023
1 parent c0b9f1e commit 8049138
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platform/posix/transport/src/mbedtls_pkcs11_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,17 +860,17 @@ void Mbedtls_Pkcs11_Disconnect( NetworkContext_t * pNetworkContext )
{
LogInfo( ( "Closing TLS connection: TLS close-notify sent." ) );
}
else if( ( tlsStatus == MBEDTLS_ERR_SSL_WANT_READ ) &&
else if( ( tlsStatus == MBEDTLS_ERR_SSL_WANT_READ ) ||
( tlsStatus == MBEDTLS_ERR_SSL_WANT_WRITE ) )
{
/* WANT_READ and WANT_WRITE can be ignored. Logging for debugging purposes. */
/* WANT_READ or WANT_WRITE can be ignored. Logging for debugging purposes. */
LogInfo( ( "TLS close-notify sent; "
"received %s as the TLS status which can be ignored for close-notify.",
( tlsStatus == MBEDTLS_ERR_SSL_WANT_READ ) ? "WANT_READ" : "WANT_WRITE" ) );
}
else
{
/* Ignore the WANT_READ and WANT_WRITE return values. */
/* Ignore the WANT_READ or WANT_WRITE return values. */
LogError( ( "Failed to send TLS close-notify: mbedTLSError= %s : %s.",
mbedtlsHighLevelCodeOrDefault( tlsStatus ),
mbedtlsLowLevelCodeOrDefault( tlsStatus ) ) );
Expand Down

0 comments on commit 8049138

Please sign in to comment.