diff options
-rwxr-xr-x | install/tools/ipa-replica-prepare | 12 | ||||
-rw-r--r-- | ipaserver/install/certs.py | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare index 87a3ae4c..6e9d649a 100755 --- a/install/tools/ipa-replica-prepare +++ b/install/tools/ipa-replica-prepare @@ -283,7 +283,11 @@ def main(): print "Copy failed %s" % e sys.exit(1) print "Creating SSL certificate for the Directory Server" - export_certdb(api.env.realm, ds_dir, dir, passwd_fname, "dscert", replica_fqdn, subject_base) + try: + export_certdb(api.env.realm, ds_dir, dir, passwd_fname, "dscert", replica_fqdn, subject_base) + except errors.CertificateOperationError, e: + print "%s" % e + sys.exit(1) if options.http_pin: passwd = options.http_pin @@ -304,7 +308,11 @@ def main(): sys.exit(1) else: print "Creating SSL certificate for the Web Server" - export_certdb(api.env.realm, ds_dir, dir, passwd_fname, "httpcert", replica_fqdn, subject_base) + try: + export_certdb(api.env.realm, ds_dir, dir, passwd_fname, "httpcert", replica_fqdn, subject_base) + except errors.CertificateOperationError, e: + print "%s" % e + sys.exit(1) print "Exporting RA certificate" export_ra_pkcs12(dir, dirman_password) diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py index c8e1d17d..a9891fbd 100644 --- a/ipaserver/install/certs.py +++ b/ipaserver/install/certs.py @@ -37,6 +37,7 @@ from ipalib import pkcs10 from ConfigParser import RawConfigParser import service from ipalib import x509 +from ipalib.errors import CertificateOperationError from nss.error import NSPRError import nss.nss as nss |