Skip to content

Commit

Permalink
Merge pull request openstack-charmers#56 from openstack-charmers/fix-…
Browse files Browse the repository at this point in the history
…cert-tz

Use UTC when calculating certificate validity
  • Loading branch information
ChrisMacNaughton committed Sep 10, 2019
2 parents 4a5f72a + caed1ce commit fd4e5b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zaza/openstack/utilities/cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ def generate_cert(common_name,
cryptography.x509.oid.NameOID.COMMON_NAME, issuer_name),
]))
builder = builder.not_valid_before(
datetime.datetime.today() - datetime.timedelta(0, 1, 0),
datetime.datetime.utcnow() - datetime.timedelta(0, 1, 0),
)
builder = builder.not_valid_after(
datetime.datetime.today() + datetime.timedelta(30, 0, 0),
datetime.datetime.utcnow() + datetime.timedelta(30, 0, 0),
)
builder = builder.serial_number(cryptography.x509.random_serial_number())
builder = builder.public_key(public_key)
Expand Down

0 comments on commit fd4e5b7

Please sign in to comment.