From: Ankita Shetty Date: Fri, 20 Nov 2020 09:15:35 +0000 (+0100) Subject: x509_vfy.c: Remove superfluous assignment to 'ret' in check_chain() X-Git-Tag: openssl-3.0.0-alpha9~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5811387bac39cdb6d009dc0139b56e6896259cbd;p=thirdparty%2Fopenssl.git x509_vfy.c: Remove superfluous assignment to 'ret' in check_chain() Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/13458) --- diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 1ee688f3b81..d73e078cfe2 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -484,11 +484,9 @@ static int check_chain(X509_STORE_CTX *ctx) CHECK_CB((ctx->param->flags & X509_V_FLAG_X509_STRICT) != 0 && ret != 1 && ret != 0, ctx, x, i, X509_V_ERR_INVALID_CA); - ret = 1; break; case 0: - CHECK_CB(ret != 0, ctx, x, i, X509_V_ERR_INVALID_NON_CA); - ret = 1; + CHECK_CB(ret != 0, ctx, x, i, X509_V_ERR_INVALID_NON_CA); break; default: /* X509_V_FLAG_X509_STRICT is implicit for intermediate CAs */ @@ -496,7 +494,6 @@ static int check_chain(X509_STORE_CTX *ctx) || ((i + 1 < num || ctx->param->flags & X509_V_FLAG_X509_STRICT) && ret != 1), ctx, x, i, X509_V_ERR_INVALID_CA); - ret = 1; break; } if (num > 1) {