diff options
| author | Zuul <zuul@review.opendev.org> | 2020-07-08 17:30:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-07-08 17:30:38 +0000 |
| commit | 8aed5feab8a5ae65658ea03fe1f2c238f6ffd908 (patch) | |
| tree | ee8e12c2f7a9bb3d2bda4586152f8259142ba174 /openstackclient/image/v2/image.py | |
| parent | fa517fbf44db9172f27045829757499c03ea3b0c (diff) | |
| parent | c06d82563526c715d3ed508fa3cc5f9dc0963294 (diff) | |
| download | python-openstackclient-5.3.0.tar.gz | |
Merge "Fix uploading an signed image does not work if private signing key is encrypted"5.3.0
Diffstat (limited to 'openstackclient/image/v2/image.py')
| -rw-r--r-- | openstackclient/image/v2/image.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index b068ddaf..029f57a3 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -440,8 +440,14 @@ class CreateImage(command.ShowOne): prompt=("Please enter private key password, leave " "empty if none: "), confirm=False) + if not pw or len(pw) < 1: pw = None + else: + # load_private_key() requires the password to be + # passed as bytes + pw = pw.encode() + signer.load_private_key( sign_key_path, password=pw) |
