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

[3006.x] Migrate to TZ-aware datetime objects in x509_v2 #65838

Merged
merged 5 commits into from
May 14, 2024

Conversation

lkubb
Copy link
Contributor

@lkubb lkubb commented Jan 10, 2024

What does this PR do?

  • replaces datetime.utcnow with datetime.now(tz=timezone.utc)
  • generally uses TZ-aware datetimes internally
  • thus also fixes a bug in CRL creation (see linked issue)

What issues does this PR fix or reference?

Fixes: #65837
Ref: #65604

Previous Behavior

CRLs were created with wrong timestamps, Python 3.12 would log DeprecationWarnings

New Behavior

Correct CRL timestamps, no warnings

Merge requirements satisfied?

Commits signed with GPG?

Yes

@lkubb lkubb requested a review from a team as a code owner January 10, 2024 19:40
@lkubb lkubb requested review from felippeb and removed request for a team January 10, 2024 19:40
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Migrate to TZ-aware datetime objects in x509_v2 [3006.x] Migrate to TZ-aware datetime objects in x509_v2 Jan 10, 2024
@lkubb lkubb force-pushed the x509-v2-utcnow branch 2 times, most recently from 7081754 to c3263cf Compare January 10, 2024 19:50
@lkubb
Copy link
Contributor Author

lkubb commented May 2, 2024

@dwoz Anything holding this up? It should be quite straight-forward.

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.

None yet

3 participants