Merge lp:~mthaddon/charm-haproxy/lp-2030726 into lp:charm-haproxy

Proposed by Tom Haddon
Status: Merged
Approved by: Canonical IS Review Bot
Approved revision: 161
Merged at revision: 161
Proposed branch: lp:~mthaddon/charm-haproxy/lp-2030726
Merge into: lp:charm-haproxy
Diff against target: 12 lines (+1/-1)
1 file modified
hooks/hooks.py (+1/-1)
To merge this branch: bzr merge lp:~mthaddon/charm-haproxy/lp-2030726
Reviewer Review Type Date Requested Status
Canonical IS Review Bot Approve
Canonical IS Reviewers Pending
Review via email: mp+448760@code.launchpad.net

Commit message

Ensure content of self-signed cert is correctly encoded lp#2030726

Description of the change

Ensure content of self-signed cert is correctly encoded lp#2030726.

If we're not using a self-signed cert the `content` is generated with `base64.b64decode` which returns bytes rather than a string, so make sure content is generated consistently here.

I've tested this by deploying haproxy (with ssl_cert=SELFSIGNED) and pollen and relating them, observing the error mentioned in the bug, and then making this change and confirming it fixes the issue.

To post a comment you must log in.
Revision history for this message
Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Canonical IS Review Bot (canonical-is-reviewbot) wrote :

Proxy approval for barryprice

review: Approve
Revision history for this message
Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 161

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2023-08-03 10:42:39 +0000
3+++ hooks/hooks.py 2023-08-09 07:23:17 +0000
4@@ -347,7 +347,7 @@
5 return
6 if ssl_cert == "SELFSIGNED":
7 log("Using self-signed certificate")
8- content = "".join(get_selfsigned_cert())
9+ content = "".join(get_selfsigned_cert()).encode('utf-8')
10 else:
11 ssl_key = config_data.get("ssl_key")
12 if not ssl_key:

Subscribers

People subscribed via source and target branches

to all changes: