summaryrefslogtreecommitdiff
path: root/python/vyos/pki.py
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-08-13 13:15:15 +0300
committerNataliia Solomko <natalirs1985@gmail.com>2024-08-13 13:15:15 +0300
commit27fb633bbe45321eecd8225c32a2fd16882633a9 (patch)
tree79a07fbda13c6694b43ea7337ef75f42a3194053 /python/vyos/pki.py
parent7a546896cb971ede7e1003bd7d0ce1f0485cbd72 (diff)
downloadvyos-1x-27fb633bbe45321eecd8225c32a2fd16882633a9.tar.gz
vyos-1x-27fb633bbe45321eecd8225c32a2fd16882633a9.zip
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):