summaryrefslogtreecommitdiffstats
path: root/base/common/python/pki/nssdb.py
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2016-04-16 02:43:03 +0200
committerEndi S. Dewata <edewata@redhat.com>2016-04-20 03:08:54 +0200
commitb24ea9e24233636d18806326a9e2883235eb38d7 (patch)
tree1b9f4133b4757f348d343f6ae51720e464bcec1b /base/common/python/pki/nssdb.py
parentffcbc6809c1329b290c29eed962efce2bc50392e (diff)
downloadpki-b24ea9e24233636d18806326a9e2883235eb38d7.tar.gz
pki-b24ea9e24233636d18806326a9e2883235eb38d7.tar.xz
pki-b24ea9e24233636d18806326a9e2883235eb38d7.zip
Fixed PKCS #12 export options.
The CLIs for exporting PKCS #12 file have been modified to accept options to export without trust flags, keys, and/or certificate chain. https://fedorahosted.org/pki/ticket/1736
Diffstat (limited to 'base/common/python/pki/nssdb.py')
-rw-r--r--base/common/python/pki/nssdb.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/base/common/python/pki/nssdb.py b/base/common/python/pki/nssdb.py
index 503bd412b..30b1d4793 100644
--- a/base/common/python/pki/nssdb.py
+++ b/base/common/python/pki/nssdb.py
@@ -545,6 +545,9 @@ class NSSDatabase(object):
pkcs12_password_file=None,
nicknames=None,
append=False,
+ include_trust_flags=True,
+ include_key=True,
+ include_chain=True,
debug=False):
tmpdir = tempfile.mkdtemp()
@@ -580,6 +583,15 @@ class NSSDatabase(object):
if append:
cmd.extend(['--append'])
+ if not include_trust_flags:
+ cmd.extend(['--no-trust-flags'])
+
+ if not include_key:
+ cmd.extend(['--no-key'])
+
+ if not include_chain:
+ cmd.extend(['--no-chain'])
+
if debug:
cmd.extend(['--debug'])