Merge lp:~tribaal/charms/trusty/haproxy/longer-openssl-selfsigned into lp:charms/trusty/haproxy

Proposed by Chris Glass
Status: Merged
Merged at revision: 98
Proposed branch: lp:~tribaal/charms/trusty/haproxy/longer-openssl-selfsigned
Merge into: lp:charms/trusty/haproxy
Diff against target: 24 lines (+1/-2)
2 files modified
data/openssl.cnf (+0/-1)
hooks/hooks.py (+1/-1)
To merge this branch: bzr merge lp:~tribaal/charms/trusty/haproxy/longer-openssl-selfsigned
Reviewer Review Type Date Requested Status
David Britton (community) Approve
Review via email: mp+274687@code.launchpad.net

Description of the change

This branch makes the self-signed SSL certificate last for 3650 days instead of the default of 30 days.

Passing the value in the config files doesn't actually works, turns out. Passing it through the command-line invocation does work. This furthermore makes the haproxy charm do the same thing as the apache2 charm, improving overall consistency.

To post a comment you must log in.
Revision history for this message
David Britton (dpb) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/openssl.cnf'
2--- data/openssl.cnf 2015-01-20 17:39:18 +0000
3+++ data/openssl.cnf 2015-10-16 09:43:21 +0000
4@@ -1,7 +1,6 @@
5 RANDFILE = /dev/urandom
6
7 [ req ]
8-default_days = 3650
9 default_bits = 1024
10 default_keyfile = privkey.pem
11 distinguished_name = req_distinguished_name
12
13=== modified file 'hooks/hooks.py'
14--- hooks/hooks.py 2015-08-18 10:57:55 +0000
15+++ hooks/hooks.py 2015-10-16 09:43:21 +0000
16@@ -1257,7 +1257,7 @@
17 subprocess.call(
18 ['openssl', 'req', '-new', '-x509', '-nodes', '-config',
19 os.path.join(os.environ['CHARM_DIR'], 'data', 'openssl.cnf'),
20- '-keyout', key_file, '-out', cert_file],)
21+ '-keyout', key_file, '-out', cert_file, '-days', '3650'],)
22 os.umask(old_mask)
23 uid = pwd.getpwnam('haproxy').pw_uid
24 os.chown(key_file, uid, -1)

Subscribers

People subscribed via source and target branches

to all changes: