Add Cert+PK generation to Certificate Interface
Change-Id: I82aa573c7db13c7a491b18540379b234c1023eb9
This commit is contained in:
parent
6b511cc113
commit
293f44e211
@ -25,7 +25,8 @@ import six
|
|||||||
class CertGenerator(object):
|
class CertGenerator(object):
|
||||||
"""Base Cert Generator Interface
|
"""Base Cert Generator Interface
|
||||||
|
|
||||||
A Certificate Generator is responsible for signing TLS certificates.
|
A Certificate Generator is responsible for generating private keys,
|
||||||
|
generating CSRs, and signing TLS certificates.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
@ -38,7 +39,22 @@ class CertGenerator(object):
|
|||||||
:param csr: A Certificate Signing Request
|
:param csr: A Certificate Signing Request
|
||||||
:param validity: Valid for <validity> seconds from the current time
|
:param validity: Valid for <validity> seconds from the current time
|
||||||
|
|
||||||
:return: Signed certificate
|
:return: PEM Encoded Signed certificate
|
||||||
:raises Exception: If certificate signing fails
|
:raises Exception: If certificate signing fails
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@abc.abstractmethod
|
||||||
|
def generate_cert_key_pair(self, cn, validity, bit_length, passphrase):
|
||||||
|
"""Generates a private key and certificate pair
|
||||||
|
|
||||||
|
:param cn: Common name to use for the Certificate
|
||||||
|
:param validity: Validity period for the Certificate
|
||||||
|
:param bit_length: Private key bit length
|
||||||
|
:param passphrase: Passphrase to use for encrypting the private key
|
||||||
|
|
||||||
|
:return: octavia.certificates.common.Cert representation of the
|
||||||
|
certificate data
|
||||||
|
:raises Exception: If generation fails
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user