From d3bbfe07b1cb2d65a7af6530ea01374b20a761e4 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 15 Apr 2016 02:30:00 +0200 Subject: 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 --- base/common/python/pki/nssdb.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'base/common/python/pki') 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) -- cgit