summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/server/python/pki/server/cli/subsystem.py21
1 files changed, 8 insertions, 13 deletions
diff --git a/base/server/python/pki/server/cli/subsystem.py b/base/server/python/pki/server/cli/subsystem.py
index 42da26e10..04461f2f6 100644
--- a/base/server/python/pki/server/cli/subsystem.py
+++ b/base/server/python/pki/server/cli/subsystem.py
@@ -951,11 +951,8 @@ class SubsystemCertValidateCLI(pki.cli.CLI):
print(' Token: %s' % token)
- if token and token.lower() in ['internal', 'internal key storage token']:
- token = None
-
- # get token password and store in temporary file
- passwd = instance.get_token_password(token)
+ # get internal token password and store in temporary file
+ passwd = instance.get_token_password()
pwfile_handle, pwfile_path = mkstemp()
os.write(pwfile_handle, passwd)
@@ -964,15 +961,13 @@ class SubsystemCertValidateCLI(pki.cli.CLI):
try:
cmd = ['pki',
'-d', instance.nssdb_dir,
- '-C', pwfile_path]
-
- if token:
- cmd.extend(['--token', token])
+ '-C', pwfile_path,
+ 'client-cert-validate',
+ nickname,
+ '--certusage', usage]
- cmd.extend(['client-cert-validate',
- nickname,
- '--certusage', usage
- ])
+ if self.verbose:
+ print('Command: %s' % cmd)
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
print(' Status: VALID')