summaryrefslogtreecommitdiffstats
path: root/base/server/python
diff options
context:
space:
mode:
Diffstat (limited to 'base/server/python')
-rw-r--r--base/server/python/pki/server/cli/ocsp.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/server/python/pki/server/cli/ocsp.py b/base/server/python/pki/server/cli/ocsp.py
index c32e8ded6..246f5932d 100644
--- a/base/server/python/pki/server/cli/ocsp.py
+++ b/base/server/python/pki/server/cli/ocsp.py
@@ -118,9 +118,15 @@ class OCSPClonePrepareCLI(pki.cli.CLI):
sys.exit(1)
instance = pki.server.PKIInstance(instance_name)
+ if not instance.is_valid():
+ print('ERROR: Invalid instance %s.' % instance_name)
+ sys.exit(1)
instance.load()
subsystem = instance.get_subsystem('ocsp')
+ if not subsystem:
+ print("ERROR: No OCSP subsystem in instance %s." % instance_name)
+ sys.exit(1)
tmpdir = tempfile.mkdtemp()