From: Daniel Stenberg Date: Tue, 8 Mar 2022 12:38:13 +0000 (+0100) Subject: openssl: fix CN check error code X-Git-Tag: curl-7_83_0~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=911714d617c106ed5d553bf003e34ec94ab6a136;p=thirdparty%2Fcurl.git openssl: fix CN check error code Due to a missing 'else' this returns error too easily. Regressed in: d15692ebb Reported-by: Kristoffer Gleditsch Fixes #8559 Closes #8560 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 0b79fc50a9..4618beeb38 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1817,7 +1817,8 @@ CURLcode Curl_ossl_verifyhost(struct Curl_easy *data, struct connectdata *conn, memcpy(peer_CN, ASN1_STRING_get0_data(tmp), peerlen); peer_CN[peerlen] = '\0'; } - result = CURLE_OUT_OF_MEMORY; + else + result = CURLE_OUT_OF_MEMORY; } } else /* not a UTF8 name */