diff options
Diffstat (limited to 'src/cryptography')
-rw-r--r-- | src/cryptography/hazmat/primitives/serialization.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/primitives/serialization.py b/src/cryptography/hazmat/primitives/serialization.py index e1ffab9e..38c541cb 100644 --- a/src/cryptography/hazmat/primitives/serialization.py +++ b/src/cryptography/hazmat/primitives/serialization.py @@ -56,8 +56,7 @@ def load_ssh_public_key(data, backend): def _load_ssh_rsa_public_key(data, backend): - if not data.startswith(b'ssh-rsa '): - raise ValueError('SSH-formatted RSA keys must begin with ssh-rsa') + assert data.startswith(b'ssh-rsa ') parts = data.split(b' ') data = base64.b64decode(parts[1]) |