Skip to content

Commit 8aed5fe

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix uploading an signed image does not work if private signing key is encrypted"
2 parents fa517fb + c06d825 commit 8aed5fe

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

openstackclient/image/v2/image.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,14 @@ def take_action(self, parsed_args):
440440
prompt=("Please enter private key password, leave "
441441
"empty if none: "),
442442
confirm=False)
443+
443444
if not pw or len(pw) < 1:
444445
pw = None
446+
else:
447+
# load_private_key() requires the password to be
448+
# passed as bytes
449+
pw = pw.encode()
450+
445451
signer.load_private_key(
446452
sign_key_path,
447453
password=pw)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
While uploading a signed image, a private key to sign that image must be
5+
specified. The CLI client asks for the password of that private key. Due
6+
to wrong encoding handling while using Python 3, the password is not
7+
accepted, whether it is correct or not.

0 commit comments

Comments
 (0)