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.
This commit is contained in:
Lars Karlitski 2019-01-06 22:19:11 +01:00 committed by Brian C. Lane
parent 2af0973155
commit e194b5926c
2 changed files with 8 additions and 1 deletions

View File

@ -46,7 +46,7 @@ Requires: kpartx
# Python modules
Requires: libselinux-python3
Requires: python3-mako
Requires: python3-kickstart
Requires: python3-kickstart >= 3.19
Requires: python3-dnf >= 3.2.0
Requires: python3-librepo

View File

@ -110,6 +110,13 @@ def repo_to_ks(r, url="url"):
if not r.sslverify:
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