Skip to content

Commit

Permalink
Fixing prompt for empty passphrase
Browse files Browse the repository at this point in the history
  • Loading branch information
silverdaz committed Dec 4, 2019
1 parent dd78fbb commit 4465f42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypt4gh/keys/c4gh.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def decode_string(stream):


def encode_private_key(key, passphrase, comment):
if passphrase is None:
if not passphrase: # None and empty
print(f'WARNING: The private key is not encrypted', file=sys.stderr)
return (MAGIC_WORD +
encode_string(None) + # kdf = none (no kdfoptions)
Expand Down

0 comments on commit 4465f42

Please sign in to comment.