Merge "Replace use of deprecated cert.not_valid_after"

This commit is contained in:
Zuul
2024-06-06 15:06:30 +00:00
committed by Gerrit Code Review
2 changed files with 5 additions and 2 deletions

View File

@@ -300,7 +300,7 @@ def get_cert_expiration(certificate_pem):
try:
cert = x509.load_pem_x509_certificate(certificate_pem,
backends.default_backend())
return cert.not_valid_after
return cert.not_valid_after_utc
except Exception as e:
LOG.exception('Unreadable Certificate.')
raise exceptions.UnreadableCert from e