diff --git a/test/scapy/layers/tls/cert.uts b/test/scapy/layers/tls/cert.uts index 35a8d050059..cb3b363397e 100644 --- a/test/scapy/layers/tls/cert.uts +++ b/test/scapy/layers/tls/cert.uts @@ -329,7 +329,13 @@ x.notAfter == (2026, 3, 30, 7, 38, 59, 0, 89, -1) = Cert class : test remainingDays assert abs(x.remainingDays("02/12/11")) > 5000 -assert abs(x.remainingDays("Feb 12 10:00:00 2011 Paris, Madrid")) > 1 +assert abs(x.remainingDays("Feb 12 10:00:00 2011 UTC")) > 5000 + +from unittest.mock import patch +import time + +with patch('time.localtime', return_value=time.struct_time((2026, 3, 1, 0, 0, 0, 6, 60, 0))): + assert abs(x.remainingDays("Feb 12 10:00:00 2011 Paris, Madrid")) > 1 = Cert class : Checking RSA public key assert type(x.pubkey) is PubKeyRSA @@ -1104,4 +1110,4 @@ assert [x.buffer for x in aikOpaque.policyDigestList.digests] == [ b'\xc4\x13\xa8G\xb1\x11\x12\xb1\xcb\xdd\xd4\xec\xa4\xda\xaa\x15\xa1\x85,\x1c;\xbaWF\x1d%v\x05\xf3\xd5\xafS', b'', b'\x04\x8e\x9a:\xce\x08X?y\xf3D\xffx[\xbe\xa9\xf0z\xc7\xfa3%\xb3\xd4\x9a!\xddQ\x94\xc6XP', -] \ No newline at end of file +]