Cryptography issues a deprecation warning when timezone-unaware datetime properties are accessed on x509.Certificate instances. For example:
/Users/builder/.pyenv/versions/3.8.13/lib/python3.8/site-packages/codemagic/models/certificate.py:123: CryptographyDeprecationWarning: Properties that return a naïve datetime object have been deprecated. Please switch to not_valid_after_utc.
return self.certificate.not_valid_after.replace(tzinfo=timezone.utc)
Cryptography issues a deprecation warning when timezone-unaware datetime properties are accessed on
x509.Certificate
instances. For example:Since version 42.0.0 there are timezone-aware alternatives that should be used instead. In this PR usages of naive datetime properties
x509.Certificate.not_valid_after
andx509.Certificate.not_valid_before
are replaced with timezone-aware propertiesx509.Certificate.not_valid_after_utc
andx509.Certificate.not_valid_before_utc
respectively.