diff --git a/README.md b/README.md index bb721f3..abba820 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Hush does not require a master password as other password managers do, instead i #### What's new? +- Version 202001.4 (Jan 23, 2020) + + - Improved compatibility with ssh RSA keys + - Version 202001.3 (Jan 18, 2020) - Initial stable release diff --git a/hush/console.py b/hush/console.py index fa9d6f2..eabf0fb 100644 --- a/hush/console.py +++ b/hush/console.py @@ -64,7 +64,7 @@ def config_callback(ctx, param, value): @click.group() -@click.version_option("202001.3") +@click.version_option("202001.4") @click.option( "-c", "--config-file", diff --git a/hush/keypairs.py b/hush/keypairs.py index acc2872..20f710f 100644 --- a/hush/keypairs.py +++ b/hush/keypairs.py @@ -10,6 +10,9 @@ def generate(bits, passphrase): def change_passphrase(key, old_passphrase, new_passphrase): key = _RSA.importKey(key, old_passphrase) - return key.export_key( - passphrase=new_passphrase, pkcs=8, protection="scryptAndAES128-CBC" - ) + if new_passphrase: + return key.export_key( + passphrase=new_passphrase, pkcs=8, protection="scryptAndAES128-CBC" + ) + else: + return key.exportKey() diff --git a/pyproject.toml b/pyproject.toml index b87e0e0..3fa2f1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ push = false [tool.poetry] name = "hush" -version = "202001.3" +version = "202001.4" description = "Minimalistic command line secret management" license = "BSD-3-Clause" authors = ["Lech Gudalewicz "] diff --git a/tests/test_cmd.py b/tests/test_cmd.py index d8a559b..6bd4152 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -36,7 +36,7 @@ def test_version(): runner = CliRunner() output = runner.invoke(cli, "--version").output.strip() - assert "202001.3" in output + assert "202001.4" in output def test_generate_default():