Author: brane
Date: Sat Jul 5 05:20:44 2025
New Revision: 1926966
URL: http://svn.apache.org/viewvc?rev=1926966&view=rev
Log:
Follow up to r1926950: Fix a missing error check.
* buckets/ssl_buckets.c
(ssl_pass_cb): Remove the unused 'status' variable and instead check the
return value from ctx->cert_pw_callback.
Modified:
serf/trunk/buckets/ssl_buckets.c
Modified: serf/trunk/buckets/ssl_buckets.c
URL:
http://svn.apache.org/viewvc/serf/trunk/buckets/ssl_buckets.c?rev=1926966&r1=1926965&r2=1926966&view=diff
==============================================================================
--- serf/trunk/buckets/ssl_buckets.c (original)
+++ serf/trunk/buckets/ssl_buckets.c Sat Jul 5 05:20:44 2025
@@ -1565,17 +1565,16 @@ static int ssl_pass_cb(UI *ui, UI_STRING
serf_ssl_context_t *ctx = UI_get0_user_data(ui);
const char *password;
- apr_status_t status;
if (ctx->cert_pw_success) {
- status = APR_SUCCESS;
password = ctx->cert_pw_success;
ctx->cert_pw_success = NULL;
}
else if (ctx->cert_pw_callback) {
- status = ctx->cert_pw_callback(ctx->cert_pw_userdata,
- ctx->cert_uri,
- &password);
+ if (APR_SUCCESS != ctx->cert_pw_callback(ctx->cert_pw_userdata,
+ ctx->cert_uri,
+ &password))
+ return 0;
}
else {
return 0;