| 1 |
From: Andrey Rakhmatullin <[email protected]> |
| 2 |
Date: Mon, 18 Mar 2024 20:53:31 +0500 |
| 3 |
Subject: Fix running tests on 32-bit time_t platforms. |
| 4 |
|
| 5 |
--- |
| 6 |
tests/test_crypto.py | 5 ++++- |
| 7 |
1 file changed, 4 insertions(+), 1 deletion(-) |
| 8 |
|
| 9 |
diff --git a/tests/test_crypto.py b/tests/test_crypto.py |
| 10 |
index 7b07b44..2183add 100644 |
| 11 |
--- a/tests/test_crypto.py |
| 12 |
+++ b/tests/test_crypto.py |
| 13 |
@@ -3364,7 +3364,10 @@ class TestX509StoreContext: |
| 14 |
expire_datetime = datetime.strptime( |
| 15 |
expire_time.decode("utf-8"), "%Y%m%d%H%M%SZ" |
| 16 |
) |
| 17 |
- store.set_time(expire_datetime) |
| 18 |
+ try: |
| 19 |
+ store.set_time(expire_datetime) |
| 20 |
+ except OverflowError: |
| 21 |
+ pytest.skip("Doesn't work with 32-bit time_t") |
| 22 |
|
| 23 |
store_ctx = X509StoreContext(store, self.intermediate_server_cert) |
| 24 |
with pytest.raises(X509StoreContextError) as exc: |