~lutostag/charms/trusty/apache2/multiple-extra-packages

« back to all changes in this revision

Viewing changes to hooks/hooks.py

  • Committer: Haw Loeung (hloeung)
  • Date: 2014-12-12 03:41:09 UTC
  • mfrom: (56.2.7 ssl-security-options)
  • Revision ID: haw.loeung@canonical.com-20141212034109-7vx563hc6hb60so8
[r=aisrael] Add option to override supported SSL protocol and cipher suites; Enforce server's preference instead of browser/client and ship out Canonical IS recommended cipher suites by default. Also pull in changes from precise charm - lp:charms/apache2

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    unit_get
24
24
)
25
25
from charmhelpers.contrib.charmsupport import nrpe
 
26
from charmhelpers.fetch import apt_update
26
27
 
27
28
###############################################################################
28
29
# Global variables
287
288
def install_hook():
288
289
    if not os.path.exists(default_apache2_service_config_dir):
289
290
        os.mkdir(default_apache2_service_config_dir, 0600)
 
291
    apt_update(fatal=True)
290
292
    apt_get_install("python-jinja2")
291
293
    apt_get_install("python-pyasn1")
292
294
    apt_get_install("python-pyasn1-modules")
470
472
        'server_tokens': config_data['server_tokens'],
471
473
        'server_signature': config_data['server_signature'],
472
474
        'trace_enabled': config_data['trace_enabled'],
 
475
        'ssl_protocol': config_data['ssl_protocol'],
 
476
        'ssl_honor_cipher_order': config_data['ssl_honor_cipher_order'],
 
477
        'ssl_cipher_suite': config_data['ssl_cipher_suite'],
473
478
        'is_apache24': is_apache24(),
474
479
    }
475
480
    template = \