From a0d1b7dec66f31f015166871aac7762be58d0749 Mon Sep 17 00:00:00 2001 From: nolash Date: Wed, 9 Jun 2021 15:17:19 +0200 Subject: [PATCH] Add zero-length password option to keyfile tool --- CHANGELOG | 1 + crypto_dev_signer/runnable/keyfile.py | 3 +++ setup.py | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c5b2b5c..12fd08a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ * 0.4.14-unreleased - Remove web3 / eth-* module dependencies - Add custom keyfile handling code and cli tool + - Add zero-length password option to keyfile cli tool * 0.4.13 - Implement DictKeystore - Remove unused insert_key method in keystore interface diff --git a/crypto_dev_signer/runnable/keyfile.py b/crypto_dev_signer/runnable/keyfile.py index 80303ea..568d26e 100644 --- a/crypto_dev_signer/runnable/keyfile.py +++ b/crypto_dev_signer/runnable/keyfile.py @@ -22,6 +22,7 @@ logg = logging.getLogger() argparser = argparse.ArgumentParser() argparser.add_argument('-d', type=str, help='decrypt file') +argparser.add_argument('-z', action='store_true', help='zero-length password') argparser.add_argument('-k', type=str, help='load key from file') argparser.add_argument('-v', action='store_true', help='be verbose') args = argparser.parse_args() @@ -43,6 +44,8 @@ def main(): global pk_hex passphrase = os.environ.get('PASSPHRASE') + if args.z: + passphrase = '' r = None if mode == 'decrypt': if passphrase == None: diff --git a/setup.py b/setup.py index 06246f7..4d256b3 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ f.close() setup( name="crypto-dev-signer", - version="0.4.14b3", + version="0.4.14b4", description="A signer and keystore daemon and library for cryptocurrency software development", author="Louis Holbrook", author_email="dev@holbrook.no", @@ -63,5 +63,5 @@ setup( 'eth-keyfile=crypto_dev_signer.runnable.keyfile:main', ], }, - url='https://gitlab.com/chaintools/crypto-dev-signer', + url='https://gitlab.com/chaintool/crypto-dev-signer', )