Use 2 years for validity period for generated amphora certs

Change-Id: I4f8474badfe18861c1213b1ea3729bfa699f3d23
This commit is contained in:
Adam Harwell 2015-07-17 16:13:47 -07:00
parent 4dc114000e
commit c7130c7678
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ from taskflow import task
CONF = cfg.CONF
CONF.import_group('controller_worker', 'octavia.common.config')
LOG = logging.getLogger(__name__)
CERT_VALIDITY = 365
CERT_VALIDITY = 2 * 365 * 24 * 60 * 60
class BaseCertTask(task.Task):
@ -49,4 +49,4 @@ class GenerateServerPEMTask(BaseCertTask):
cn=amphora_id,
validity=CERT_VALIDITY)
return cert.certificate + cert.private_key
return cert.certificate + cert.private_key

View File

@ -30,4 +30,4 @@ class TestCertTasks(base.TestCase):
self.assertEqual(
pem, dummy_cert.get_certificate() + dummy_cert.get_private_key())
mock_driver.generate_cert_key_pair.assert_called_once_with(
cn='123', validity=365)
cn='123', validity=cert_task.CERT_VALIDITY)