openssl: remove bad gotos into other scope

All the `goto` did in these cases was effectively `return 0`, so just
use that explicitly.

Closes https://github.com/curl/curl/pull/16356
This commit is contained in:
Marcel Raad 2025-02-16 21:52:52 +01:00
parent 4afe3e7d8a
commit d164f49520
No known key found for this signature in database
GPG Key ID: 33C416EFAE4D6F02

View File

@ -1452,7 +1452,7 @@ int cert_stuff(struct Curl_easy *data,
failf(data, "No cert found in the openssl store: %s",
ossl_strerror(ERR_get_error(), error_buffer,
sizeof(error_buffer)));
goto fail;
return 0;
}
if(SSL_CTX_use_certificate(ctx, cert) != 1) {
@ -1728,7 +1728,7 @@ fail:
failf(data, "No private key found in the openssl store: %s",
ossl_strerror(ERR_get_error(), error_buffer,
sizeof(error_buffer)));
goto fail;
return 0;
}
if(SSL_CTX_use_PrivateKey(ctx, priv_key) != 1) {