summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-04-20 07:35:09 +0200
committerGitHub <noreply@github.com>2023-04-20 07:35:09 +0200
commit97ef83ada9c42913bae3c80e0f2432bdf901312a (patch)
tree43357a199123e1e70cde0c9efc986148af780280
parent5da9b5122bc8545ed282692f48e307ed179225cc (diff)
parent77858da1e5640aef1a542e6d6aa07715858ef750 (diff)
downloadvyos-1x-97ef83ada9c42913bae3c80e0f2432bdf901312a.tar.gz
vyos-1x-97ef83ada9c42913bae3c80e0f2432bdf901312a.zip
Merge pull request #1963 from sarthurdev/pki_fix
pki: T3642: Fix show command if no CA certs are present
-rwxr-xr-xsrc/op_mode/pki.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/op_mode/pki.py b/src/op_mode/pki.py
index 1e78c3a03..b054690b0 100755
--- a/src/op_mode/pki.py
+++ b/src/op_mode/pki.py
@@ -87,6 +87,9 @@ def get_config_certificate(name=None):
def get_certificate_ca(cert, ca_certs):
# Find CA certificate for given certificate
+ if not ca_certs:
+ return None
+
for ca_name, ca_dict in ca_certs.items():
if 'certificate' not in ca_dict:
continue