diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2011-07-30 20:16:08 +0200 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2011-07-30 20:16:08 +0200 |
commit | d1447d7be4e9eccf790f7c8b50ac6cffb0e6a8bf (patch) | |
tree | 42f8d43528e0ae456c9c997b1686b50605774741 /rsa/pem.py | |
parent | 70bc1a5611a45388591f7c7f1eefdae080a29be6 (diff) | |
download | rsa-git-d1447d7be4e9eccf790f7c8b50ac6cffb0e6a8bf.tar.gz |
Sligthly better ignoring of fields in PEM
Diffstat (limited to 'rsa/pem.py')
-rw-r--r-- | rsa/pem.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -52,6 +52,10 @@ def load_pem(contents, pem_marker): for line in contents.split('\n'): line = line.strip() + # Skip empty lines + if not line: + continue + # Handle start marker if line == pem_start: if in_pem_part: @@ -69,8 +73,8 @@ def load_pem(contents, pem_marker): in_pem_part = False break - # Skip empty lines or 'key: value' pairs. - if ':' in line or not line.strip(): + # Load fields + if ':' in line: continue pem_lines.append(line) |