Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fallback for Certificate.not_valid_before/after_utc #4892

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Nov 4, 2024

The NSSDatabase.get_cert_info() has been modified so that it will use Certificate.not_valid_before/after_utc attributes which are available since Python Cryptography 42, otherwise it will use the deprecated not_valid_before/after then convert them into UTC.

https://github.com/edewata/pki/blob/python/docs/changes/v11.6.0/API-Changes.adoc

The NSSDatabase.get_cert_info() has been modified so that it will
use Certificate.not_valid_before/after_utc attributes which are
available since Python Cryptography 42, otherwise it will use the
deprecated not_valid_before/after then convert them into UTC.
@edewata edewata requested a review from fmarco76 November 4, 2024 18:28
Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

sonarqubecloud bot commented Nov 4, 2024

@edewata
Copy link
Contributor Author

edewata commented Nov 4, 2024

@fmarco76 Thanks!

As mentioned in Slack I'm wondering if we should have used astimezone() instead:
https://docs.python.org/3/library/datetime.html#datetime.datetime.astimezone
but we can fix this separately later if needed.

@edewata edewata merged commit 16a1004 into dogtagpki:master Nov 4, 2024
158 of 168 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants