Skip to content

Commit

Permalink
Avoid re-assigning zero to ret variable.
Browse files Browse the repository at this point in the history
Resolve Mbed-TLS#3182.

Signed-off-by: irwir <[email protected]>
  • Loading branch information
irwir committed Apr 21, 2020
1 parent 5cac337 commit d3085ab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions library/ssl_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -2747,9 +2747,7 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl )
{
ssl->session_negotiate->verify_result = MBEDTLS_X509_BADCERT_MISSING;

if( authmode == MBEDTLS_SSL_VERIFY_OPTIONAL )
ret = 0;
else
if( authmode != MBEDTLS_SSL_VERIFY_OPTIONAL )
ret = MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE;

goto exit;
Expand Down

0 comments on commit d3085ab

Please sign in to comment.