Skip to content

Commit 8c81fce

Browse files
committed
Merge branch 'js/http-pki-credential-store'
The http codepath learned to let the credential layer to cache the password used to unlock a certificate that has successfully been used. * js/http-pki-credential-store: http: drop the check for an empty proxy password before approving http: store credential when PKI auth is used
2 parents ed953e1 + a4a4439 commit 8c81fce

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

http.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,9 +1635,18 @@ static int handle_curl_result(struct slot_results *results)
16351635

16361636
if (results->curl_result == CURLE_OK) {
16371637
credential_approve(&http_auth);
1638-
if (proxy_auth.password)
1639-
credential_approve(&proxy_auth);
1638+
credential_approve(&proxy_auth);
1639+
credential_approve(&cert_auth);
16401640
return HTTP_OK;
1641+
} else if (results->curl_result == CURLE_SSL_CERTPROBLEM) {
1642+
/*
1643+
* We can't tell from here whether it's a bad path, bad
1644+
* certificate, bad password, or something else wrong
1645+
* with the certificate. So we reject the credential to
1646+
* avoid caching or saving a bad password.
1647+
*/
1648+
credential_reject(&cert_auth);
1649+
return HTTP_NOAUTH;
16411650
} else if (missing_target(results))
16421651
return HTTP_MISSING_TARGET;
16431652
else if (results->http_code == 401) {

0 commit comments

Comments
 (0)