Fix ipa-replica-prepare server-cert creation

Fixes an issue introduced in 0a54fac0, we need to specify the current
master's hostname so that we know to which CA we need to connect to
create the other's server Server-Cert.

https://pagure.io/freeipa/issue/6755

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-03-13 14:25:36 +01:00 committed by Martin Basti
parent 72de679eb4
commit 992e6ecd1f

View File

@ -603,7 +603,8 @@ class ReplicaPrepare(admintool.AdminTool):
try:
db = certs.CertDB(
api.env.realm, nssdir=self.dir, subject_base=subject_base)
api.env.realm, nssdir=self.dir, subject_base=subject_base,
host_name=api.env.host)
db.create_passwd_file()
db.create_from_cacert()
db.create_server_cert(nickname, hostname)