aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cryptography/hazmat/primitives/serialization.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/primitives/serialization.py b/src/cryptography/hazmat/primitives/serialization.py
index 61a69a5d..9d384fc7 100644
--- a/src/cryptography/hazmat/primitives/serialization.py
+++ b/src/cryptography/hazmat/primitives/serialization.py
@@ -63,9 +63,9 @@ def load_ssh_public_key(data, backend):
except TypeError:
raise ValueError('Key is not in the proper format.')
- if key_type.startswith(b'ssh-rsa'):
+ if key_type == b'ssh-rsa':
return _load_ssh_rsa_public_key(decoded_data, backend)
- elif key_type.startswith(b'ssh-dss'):
+ elif key_type == b'ssh-dss':
return _load_ssh_dss_public_key(decoded_data, backend)
else:
raise UnsupportedAlgorithm(