Skip to content

Commit

Permalink
[context] Support config file option "proxy_auth_method", defaults "any"
Browse files Browse the repository at this point in the history
Adds support for the "proxy_auth_method" configuration file option.
The default value is set to "any". Before that, the default
librepo/libcurl value "basic" was used.

Related to https://bugzilla.redhat.com/show_bug.cgi?id=1924001 .
  • Loading branch information
jrohel authored and m-blaha committed Feb 25, 2021
1 parent 2ea1601 commit 2e8983f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libdnf/dnf-repo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,11 @@ dnf_repo_set_keyfile_data(DnfRepo *repo, gboolean reloadFromGKeyFile, GError **e
if (!lr_handle_setopt(priv->repo_handle, error, LRO_PROXY, tmp_cstr))
return FALSE;

// setup proxy authorization method
auto proxyAuthMethods = libdnf::Repo::Impl::stringToProxyAuthMethods(conf->proxy_auth_method().getValue());
if (!lr_handle_setopt(priv->repo_handle, error, LRO_PROXYAUTHMETHODS, static_cast<long>(proxyAuthMethods)))
return FALSE;

// setup proxy username and password
tmp_cstr = NULL;
if (!conf->proxy_username().empty()) {
Expand Down

0 comments on commit 2e8983f

Please sign in to comment.