koris package¶
Submodules¶
koris.cli module¶
koris.ssl module¶
ssl.py hold all ssl certifcates creation utilities and classes
-
class
koris.ssl.
CertBundle
(key, cert)[source]¶ Bases:
object
a simple class to hold a certifacte data with its own key
-
koris.ssl.
create_ca
(private_key, public_key, country, state_province, locality, orga, unit, name, key_usage=[True, False, True, False, False, True, False, False, False])[source]¶ create a CA signed with private_key
Parameters: - private_key (inst) – private key instance to sign the CA
- public_key (inst) – public key for the CSR
- country (str) – the country for the CSR
- state_province (str) – the state or province for the CSR
- locality (str) – the locality for the CSR
- orga (str) – the organization for the CSR
- unit (str) – the unit for the CSR
- name (str) – the name for the CSR
- key_usage (list) – Key Usage parameters. Indices stand for: [digital_signature, content_commitment, key_encipherment, data_encipherment, key_agreement, key_cert_sign, crl_sign, encipher_only, decipher_only]
Returns: ssl certificate object
-
koris.ssl.
create_certificate
(ca_bundle, public_key, country, state_province, locality, orga, unit, name, hosts=None, ips=None, key_usage=[True, False, True, False, False, False, False, False, False])[source]¶ create a certificate signed with CA private_key
Parameters: - ca_bundle (inst) – private key instance to sign the CA
- public_key (inst) – public key for the CSR
- country (str) – the country for the CSR
- state_province (str) – the state or province for the CSR
- locality (str) – the locality for the CSR
- orga (str) – the organization for the CSR
- unit (str) – the unit for the CSR
- name (str) – the name for the CSR
- key_usage (list) – Key Usage parameters. Indices stand for: [digital_signature, content_commitment, key_encipherment, data_encipherment, key_agreement, key_cert_sign, crl_sign, encipher_only, decipher_only]
Returns: ssl certificate object
-
koris.ssl.
create_certs
(config, names, ips, write=True, ca_bundle=None)[source]¶ create new certificates, useful for replacing certificates and later for adding nodes …
-
koris.ssl.
create_key
(size=2048, public_exponent=65537)[source]¶ Create an RSA private key
Parameters: - size (int) –
- public_exponent (int) –
Returns: rsa key object instance
-
koris.ssl.
read_cert
(cert)[source]¶ read SSL certificate from path
Parameters: cert (str) – Returns: cert (inst) - a certificate instance
-
koris.ssl.
read_key
(key)[source]¶ read SSL key from path
Parameters: key (str) – Returns: private_key (inst) - a private key instance