summaryrefslogtreecommitdiffstats
path: root/base/server/python/pki/server/cli/instance.py
diff options
context:
space:
mode:
Diffstat (limited to 'base/server/python/pki/server/cli/instance.py')
-rw-r--r--base/server/python/pki/server/cli/instance.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/base/server/python/pki/server/cli/instance.py b/base/server/python/pki/server/cli/instance.py
index 4eeee5d60..7520b32b8 100644
--- a/base/server/python/pki/server/cli/instance.py
+++ b/base/server/python/pki/server/cli/instance.py
@@ -77,6 +77,9 @@ class InstanceCertExportCLI(pki.cli.CLI):
print(' --pkcs12-password <password> Password for the PKCS #12 file.')
print(' --pkcs12-password-file <path> Input file containing the password for the PKCS #12 file.')
print(' --append Append into an existing PKCS #12 file.')
+ print(' --no-trust-flags Do not include trust flags')
+ print(' --no-key Do not include private key')
+ print(' --no-chain Do not include certificate chain')
print(' -v, --verbose Run in verbose mode.')
print(' --debug Run in debug mode.')
print(' --help Show help message.')
@@ -88,7 +91,8 @@ class InstanceCertExportCLI(pki.cli.CLI):
opts, args = getopt.gnu_getopt(argv, 'i:v', [
'instance=',
'pkcs12-file=', 'pkcs12-password=', 'pkcs12-password-file=',
- 'append', 'verbose', 'debug', 'help'])
+ 'append', 'no-trust-flags', 'no-key', 'no-chain',
+ 'verbose', 'debug', 'help'])
except getopt.GetoptError as e:
print('ERROR: ' + str(e))
@@ -102,6 +106,9 @@ class InstanceCertExportCLI(pki.cli.CLI):
pkcs12_password = None
pkcs12_password_file = None
append = False
+ include_trust_flags = True
+ include_key = True
+ include_chain = True
debug = False
for o, a in opts:
@@ -120,6 +127,15 @@ class InstanceCertExportCLI(pki.cli.CLI):
elif o == '--append':
append = True
+ elif o == '--no-trust-flags':
+ include_trust_flags = False
+
+ elif o == '--no-key':
+ include_key = False
+
+ elif o == '--no-chain':
+ include_chain = False
+
elif o in ('-v', '--verbose'):
self.set_verbose(True)
@@ -154,6 +170,9 @@ class InstanceCertExportCLI(pki.cli.CLI):
pkcs12_password_file=pkcs12_password_file,
nicknames=nicknames,
append=append,
+ include_trust_flags=include_trust_flags,
+ include_key=include_key,
+ include_chain=include_chain,
debug=debug)
finally:
nssdb.close()