Skip to content

Commit

Permalink
patch missed in 1.2.0 update 8142aee
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 18, 2024
1 parent 540471f commit da8b515
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packaging/rpm/patches/aioquic-pycrypto-tls-utc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- a/src/aioquic/tls.py 2024-06-21 21:32:54.744422660 +0700
+++ b/src/aioquic/tls.py 2024-06-21 21:40:59.416180513 +0700
@@ -227,9 +227,11 @@
) -> None:
# verify dates
now = utcnow()
- if now < certificate.not_valid_before_utc:
+ before = getattr(certificate, "not_valid_before_utc", 0) or certificate.not_valid_before.replace(tzinfo=datetime.timezone.utc)
+ if now < before:
raise AlertCertificateExpired("Certificate is not valid yet")
- if now > certificate.not_valid_after_utc:
+ after = getattr(certificate, "not_valid_after_utc", 0) or certificate.not_valid_after.replace(tzinfo=datetime.timezone.utc)
+ if now > after:
raise AlertCertificateExpired("Certificate is no longer valid")

# verify subject

0 comments on commit da8b515

Please sign in to comment.