Pass ssl certificate options to anaconda

If a repository has `sslcacert`, `sslclientcert`, or `ssclientkey` set,
pass them to anaconda through the kickstart file. This is mostly the
case when using RHEL repositories that are accessed through a
subscription.

Resolves: rhbz#1701033
This commit is contained in:
Lars Karlitski 2019-01-06 22:19:11 +01:00 committed by Brian C. Lane
parent 1bf7708830
commit e7c910d4fa
2 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,7 @@ Requires: python-gevent
Requires: anaconda-tui Requires: anaconda-tui
Requires: qemu-img Requires: qemu-img
Requires: tar Requires: tar
Requires: pykickstart >= 1.99.66.20
%{?systemd_requires} %{?systemd_requires}
BuildRequires: systemd BuildRequires: systemd

View File

@ -121,6 +121,13 @@ def repo_to_ks(r, url="url"):
if not r.sslverify: if not r.sslverify:
cmd += '--noverifyssl' cmd += '--noverifyssl'
if r.sslcacert:
cmd += ' --sslcacert="%s"' % r.sslcacert
if r.sslclientcert:
cmd += ' --sslclientcert="%s"' % r.sslclientcert
if r.sslclientkey:
cmd += ' --sslclientkey="%s"' % r.sslclientkey
return cmd return cmd