debian-koji/koji
Ken Dreyer 19dabc0eda client: use default CA store during client auth if serverca is unset
Prior to this change, if the following conditions were true:

1) A Koji client uses SSL authentication,
2) The user does not set the "serverca" option for their profile,
3) The user does not have a "~/.koji/serverca.crt" file present,

Then Koji did not use the default CA store to validate the hub's CA.
read_defaults() was setting the "serverca" value to an empty string ""
in these cases. This led to an AuthError in ssl_login() for the empty
string:

  raise AuthError("Server CA %s doesn't exist or is not accessible" % serverca)

Update ssl_login() to ignore empty strings in this case, treating them
the same as None.

The code in _sendOneCall() already checks this value in a similar way,
with "if verify:", so we're matching that behavior here.

With this change, Koji clients will fall back to using the default CA
store.
2020-03-11 13:33:39 +01:00
..
__init__.py client: use default CA store during client auth if serverca is unset 2020-03-11 13:33:39 +01:00
arch.py use Exception instead of BaseException for bare expection 2020-03-03 21:38:22 +08:00
auth.py use Exception instead of BaseException for bare expection 2020-03-03 21:38:22 +08:00
context.py flake8: apply E3 rules 2020-03-03 21:38:22 +08:00
daemon.py still use BaseException for logging purpose 2020-03-03 21:38:22 +08:00
db.py flake8: apply E501 with max-line-length=99 2020-03-03 21:38:22 +08:00
Makefile improve test and clean targets in Makefiles 2019-11-27 15:42:30 +01:00
plugin.py use Exception instead of BaseException for bare expection 2020-03-03 21:38:22 +08:00
policy.py flake8: apply E3 rules 2020-03-03 21:38:22 +08:00
rpmdiff.py use Exception instead of BaseException for bare expection 2020-03-03 21:38:22 +08:00
server.py flake8: apply E3 rules 2020-03-03 21:38:22 +08:00
tasks.py use Exception instead of BaseException for bare expection 2020-03-03 21:38:22 +08:00
util.py flake8: apply E501 with max-line-length=99 2020-03-03 21:38:22 +08:00
xmlrpcplus.py flake8: apply E3 rules 2020-03-03 21:38:22 +08:00