Read passwords from stdin when importing PKCS#12 files with pk12util.

This works around pk12util refusing to use empty password files, which prevents
the use of PKCS#12 files with empty password.

https://fedorahosted.org/freeipa/ticket/3897
This commit is contained in:
Jan Cholasta
2013-09-25 08:33:35 +00:00
committed by Petr Viktorin
parent 46b3588112
commit c123264ac7
6 changed files with 42 additions and 35 deletions

View File

@@ -137,9 +137,8 @@ class ReplicaPrepare(admintool.AdminTool):
"could not find directory instance: %s" % config_dir)
def check_pkcs12(self, pkcs12_file, pkcs12_pin):
pin_file = ipautil.write_tmp_file(pkcs12_pin)
installutils.check_pkcs12(
pkcs12_info=(pkcs12_file, pin_file.name),
pkcs12_info=(pkcs12_file, pkcs12_pin),
ca_file='/etc/ipa/ca.crt',
hostname=self.replica_fqdn)