Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
git+https://github.com/wbond/certvalidator@74ae7a8#egg=certvalidator==0.12.0.dev1
pyasn1
certvalidator
asn1crypto
oscrypto
pyasn1-modules
Expand Down
2 changes: 1 addition & 1 deletion signify/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def verify(self, certificate):
timestamp = self.timestamp
context = ValidationContext(
trust_roots=list(trust_roots),
moment=timestamp,
moment=timestamp if not self.allow_fetching else None,
weak_hash_algos=set() if self.allow_legacy else None,
revocation_mode=self.revocation_mode,
allow_fetching=self.allow_fetching,
Expand Down
8 changes: 8 additions & 0 deletions tests/test_authenticode.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ def test_3a7de393a36ca8911cd0842a9a25b058_valid_different_contenttype(self):
pefile = SignedPEFile(f)
pefile.verify()

def test_3a7de393a36ca8911cd0842a9a25b058_valid_with_crl_fetching(self):
"""works when timestamp is defined and CRL fetching enabled"""
with open(str(root_dir / "test_data" / "3a7de393a36ca8911cd0842a9a25b058"), "rb") as f:
pefile = SignedPEFile(f)
pefile.verify(verification_context_kwargs=
{'timestamp': datetime.datetime(2019, 1, 1, tzinfo=datetime.timezone.utc),
'allow_fetching': True, 'revocation_mode': 'hard-fail'})

def test_solwarwinds_valid_countersignature_rfc3161(self):
"""Solarwinds includes a 1.3.6.1.4.1.311.3.3.1 type countersignature"""
with open(str(root_dir / "test_data" / "SolarWinds.exe"), "rb") as f:
Expand Down