summaryrefslogtreecommitdiff
path: root/python/vyos/pki.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-08-20 07:18:17 +0200
committerGitHub <noreply@github.com>2024-08-20 07:18:17 +0200
commit538930c27a0984cd9f9a58115e6ea6395002707e (patch)
treeba08df6788d04c1736437c7666d0aa601999a9e5 /python/vyos/pki.py
parent26ebd3af8cd2aa296621dbda11ac1c1e64514ba9 (diff)
parent27fb633bbe45321eecd8225c32a2fd16882633a9 (diff)
downloadvyos-1x-538930c27a0984cd9f9a58115e6ea6395002707e.tar.gz
vyos-1x-538930c27a0984cd9f9a58115e6ea6395002707e.zip
Merge pull request #3977 from natali-rs1985/T5743-current
T5743: HTTPS API ability to import PKI certificates
Diffstat (limited to 'python/vyos/pki.py')
-rw-r--r--python/vyos/pki.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/pki.py b/python/vyos/pki.py
index 27fe793a8..5a0e2ddda 100644
--- a/python/vyos/pki.py
+++ b/python/vyos/pki.py
@@ -271,7 +271,7 @@ def load_private_key(raw_data, passphrase=None, wrap_tags=True):
try:
return serialization.load_pem_private_key(bytes(raw_data, 'utf-8'), password=passphrase)
- except ValueError:
+ except (ValueError, TypeError):
return False
def load_openssh_public_key(raw_data, type):