From da8b51531850cd4e584d6e62dd8d8a993e505aa2 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 18 Nov 2024 22:12:41 +0700 Subject: [PATCH] patch missed in 1.2.0 update 8142aee9b2d6ed713f0b003b21334bab0e8bf802 --- .../rpm/patches/aioquic-pycrypto-tls-utc.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packaging/rpm/patches/aioquic-pycrypto-tls-utc.patch diff --git a/packaging/rpm/patches/aioquic-pycrypto-tls-utc.patch b/packaging/rpm/patches/aioquic-pycrypto-tls-utc.patch new file mode 100644 index 0000000000..018955bf6f --- /dev/null +++ b/packaging/rpm/patches/aioquic-pycrypto-tls-utc.patch @@ -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