diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2023-04-18 11:40:42 +0200 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2023-04-18 11:40:42 +0200 |
commit | 77858da1e5640aef1a542e6d6aa07715858ef750 (patch) | |
tree | 06c053e0a8c3ec0acb91b2047e666f2a3d8814f5 /src/op_mode/pki.py | |
parent | a6499ea9d95d2b66d7977cea1d43f96d0116d4c3 (diff) | |
download | vyos-1x-77858da1e5640aef1a542e6d6aa07715858ef750.tar.gz vyos-1x-77858da1e5640aef1a542e6d6aa07715858ef750.zip |
pki: T3642: Fix show command if no CA certs are present
Diffstat (limited to 'src/op_mode/pki.py')
-rwxr-xr-x | src/op_mode/pki.py | 3 |
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 |