diff options
author | Endi S. Dewata <edewata@redhat.com> | 2016-04-15 02:30:00 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2016-04-15 20:03:36 +0200 |
commit | d3bbfe07b1cb2d65a7af6530ea01374b20a761e4 (patch) | |
tree | 1fd572a9a76b5bfc4610037b1c45ef5d8a63e4f4 /base/common/python | |
parent | 08f032de4090467ac4096f970609e19834b997ac (diff) | |
download | pki-d3bbfe07b1cb2d65a7af6530ea01374b20a761e4.tar.gz pki-d3bbfe07b1cb2d65a7af6530ea01374b20a761e4.tar.xz pki-d3bbfe07b1cb2d65a7af6530ea01374b20a761e4.zip |
Updated pki pkcs12-export CLI.
For consistency the pki pkcs12-export has been modified to
overwrite the PKCS #12 output file by default. A new option has
been added to append the exported certificates and keys into the
output file if the file already exists.
The same option has been added to the The pki-server
instance-cert-export and subsystem-cert-export commands.
https://fedorahosted.org/pki/ticket/1736
Diffstat (limited to 'base/common/python')
-rw-r--r-- | base/common/python/pki/nssdb.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/base/common/python/pki/nssdb.py b/base/common/python/pki/nssdb.py index 9d276332a..503bd412b 100644 --- a/base/common/python/pki/nssdb.py +++ b/base/common/python/pki/nssdb.py @@ -543,7 +543,9 @@ class NSSDatabase(object): def export_pkcs12(self, pkcs12_file, pkcs12_password=None, pkcs12_password_file=None, - nicknames=None): + nicknames=None, + append=False, + debug=False): tmpdir = tempfile.mkdtemp() @@ -575,6 +577,12 @@ class NSSDatabase(object): '--pkcs12-password-file', password_file ]) + if append: + cmd.extend(['--append']) + + if debug: + cmd.extend(['--debug']) + if nicknames: cmd.extend(nicknames) |