Merge pull request #3217 from irwir/fix_ssl_tls.c

Avoid re-assigning zero to `ret` variable.
This commit is contained in:
danh-arm 2020-04-29 18:07:10 +01:00 committed by GitHub
commit 3b1c072bfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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