diff options
| author | Jan Cholasta <jcholast@redhat.com> | 2016-12-08 12:26:06 +0100 |
|---|---|---|
| committer | Jan Cholasta <jcholast@redhat.com> | 2016-12-12 07:29:16 +0100 |
| commit | a35f5181c0af459e9f054838805628f31316cbe9 (patch) | |
| tree | 20f88653602ec175d98f7fefad25716b1ce38191 /ipapython | |
| parent | 2dcbc9416f1de708336a9afe92a138da9360ec5b (diff) | |
| download | freeipa-a35f5181c0af459e9f054838805628f31316cbe9.tar.gz freeipa-a35f5181c0af459e9f054838805628f31316cbe9.tar.xz freeipa-a35f5181c0af459e9f054838805628f31316cbe9.zip | |
certdb: fix PKCS#12 import with empty password
Since commit f919ab4ee0ec26d77ee6978e75de5daba4073402, a temporary file is
used to give passwords to pk12util. When a password is empty, the temporary
will be empty as well, which pk12util does not like.
Add new line after the password in the temporary file to please pk12util.
https://fedorahosted.org/freeipa/ticket/6541
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipapython')
| -rw-r--r-- | ipapython/certdb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipapython/certdb.py b/ipapython/certdb.py index af98a77f1..4e05b7880 100644 --- a/ipapython/certdb.py +++ b/ipapython/certdb.py @@ -168,7 +168,7 @@ class NSSDatabase(object): "-k", db_password_filename, '-v'] pkcs12_password_file = None if pkcs12_passwd is not None: - pkcs12_password_file = ipautil.write_tmp_file(pkcs12_passwd) + pkcs12_password_file = ipautil.write_tmp_file(pkcs12_passwd + '\n') args = args + ["-w", pkcs12_password_file.name] try: ipautil.run(args) |
