diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-08-03 23:52:47 +0100 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-08-03 23:52:47 +0100 |
commit | e886575a26fdc686d8f47ae3f6e29d9b68de92fa (patch) | |
tree | 83270be633909a1251c2004beafeb0b67df72a30 /src | |
parent | e0277f7e4598db6628cb378ba40bec8edb6f8672 (diff) | |
parent | 1763b759fb47698a303b8b6d9e4eac83f25c1890 (diff) | |
download | cryptography-e886575a26fdc686d8f47ae3f6e29d9b68de92fa.tar.gz cryptography-e886575a26fdc686d8f47ae3f6e29d9b68de92fa.tar.bz2 cryptography-e886575a26fdc686d8f47ae3f6e29d9b68de92fa.zip |
Merge pull request #2200 from alex/ssh-spaces
Fixes #2199 -- allow SSH keys to have spaces in their comments
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/primitives/serialization.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/primitives/serialization.py b/src/cryptography/hazmat/primitives/serialization.py index 098b31dc..fc50456e 100644 --- a/src/cryptography/hazmat/primitives/serialization.py +++ b/src/cryptography/hazmat/primitives/serialization.py @@ -33,9 +33,9 @@ def load_der_public_key(data, backend): def load_ssh_public_key(data, backend): - key_parts = data.split(b' ') + key_parts = data.split(b' ', 2) - if len(key_parts) != 2 and len(key_parts) != 3: + if len(key_parts) < 2: raise ValueError( 'Key is not in the proper format or contains extra data.') |