Skip to content

Commit c06d825

Browse files
author
Alexander Gräb
committed
Fix uploading an signed image does not work if private signing key is encrypted
Change-Id: Ia7c84aa7b840bf92aeb7db7246d14119eb727b03 Story: 2007890 Task: 40269
1 parent 1d8781a commit c06d825

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
@@ -429,8 +429,14 @@ def take_action(self, parsed_args):
429429
prompt=("Please enter private key password, leave "
430430
"empty if none: "),
431431
confirm=False)
432+
432433
if not pw or len(pw) < 1:
433434
pw = None
435+
else:
436+
# load_private_key() requires the password to be
437+
# passed as bytes
438+
pw = pw.encode()
439+
434440
signer.load_private_key(
435441
sign_key_path,
436442
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)