Skip to content

Commit

Permalink
Merge pull request #3217 from irwir/fix_ssl_tls.c
Browse files Browse the repository at this point in the history
Avoid re-assigning zero to `ret` variable.
  • Loading branch information
danh-arm authored Apr 29, 2020
2 parents 924a1f2 + d3085ab commit 3b1c072
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 3b1c072

Please sign in to comment.