mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Extract function for computing default subject base
Part of: https://fedorahosted.org/freeipa/ticket/2614 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Jan Cholasta
parent
c6db493b06
commit
6f3eb85c30
@@ -465,7 +465,7 @@ def install_check(installer):
|
||||
realm_name = options.realm_name.upper()
|
||||
|
||||
if not options.subject_base:
|
||||
options.subject_base = DN(('O', realm_name))
|
||||
options.subject_base = installutils.default_subject_base(realm_name)
|
||||
|
||||
if options.http_cert_files:
|
||||
if options.http_pin is None:
|
||||
|
||||
@@ -78,7 +78,7 @@ def install_http_certs(host_name, realm_name, subject_base):
|
||||
principal = 'HTTP/%s@%s' % (host_name, realm_name)
|
||||
# Obtain certificate for the HTTP service
|
||||
nssdir = certs.NSS_DIR
|
||||
subject = subject_base or DN(('O', realm_name))
|
||||
subject = subject_base or installutils.default_subject_base(realm_name)
|
||||
db = certs.CertDB(realm_name, nssdir=nssdir, subject_base=subject)
|
||||
db.request_service_cert('Server-Cert', principal, host_name, True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user