charmhelpers.contrib.ssl package

charmhelpers.contrib.ssl.service module

class charmhelpers.contrib.ssl.service.ServiceCA(name, ca_dir, cert_type='standard')

Bases: object

ca_cert
ca_conf
ca_key
create_certificate(common_name)
default_ca_expiry = '2190'
default_expiry = '730'
static get_ca(type='standard')
get_ca_bundle()
get_certificate(common_name)
get_conf_variables()
get_or_create_cert(common_name)
classmethod get_service_cert(type='standard')
init()
signing_conf
charmhelpers.contrib.ssl.generate_selfsigned(keyfile, certfile, keysize='1024', config=None, subject=None, cn=None)

Generate selfsigned SSL keypair

You must provide one of the 3 optional arguments: config, subject or cn If more than one is provided the leftmost will be used

Arguments: keyfile – (required) full path to the keyfile to be created certfile – (required) full path to the certfile to be created keysize – (optional) SSL key length config – (optional) openssl configuration file subject – (optional) dictionary with SSL subject variables cn – (optional) cerfificate common name

Required keys in subject dict: cn – Common name (eq. FQDN)

Optional keys in subject dict country – Country Name (2 letter code) state – State or Province Name (full name) locality – Locality Name (eg, city) organization – Organization Name (eg, company) organizational_unit – Organizational Unit Name (eg, section) email – Email Address