-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2328] Make httpclient use system certs
Force httpclient to use the default system cacert configuration. Otherwise, when the cacerts bundled with httpclient expire we are prone to get validation errors in different places (for example, openid_connect gem depends on this, and we were left without login). This patch has been copied from the gitlab PR: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/30749/diffs.
- Loading branch information
Showing
2 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
# Force httpclient to use the default system cacert configuration. | ||
# Otherwise, when the cacerts bundled with httpclient expire we are | ||
# prone to get validation errors in different places (for example, | ||
# openid_connect gem depends on this, and we were left without login). | ||
# This patch has been copied from the gitlab PR: | ||
# https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/30749/diffs. | ||
module HTTPClient::SSLConfigDefaultPaths | ||
def initialize(client) | ||
super | ||
|
||
set_default_paths | ||
end | ||
end | ||
|
||
HTTPClient::SSLConfig.prepend HTTPClient::SSLConfigDefaultPaths |