Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit test caused by expiring signing certificate #1305

Merged

Commits on Jul 22, 2024

  1. Fix unit test caused by expiring signing certificate

    The clamscan test "assorted_test.py::TC::test_pe_cert_trust" is about to
    fail because the "test.exe" test file was signed with a cert set to
    expire after only 2 years, and it has been 23 months.
    
    While attempting to generate a new one that will last 73000 days (200
    years), I discovered that any signing certificate set to expire after
    2038 will fail the trust-check because the `ca.not_after` variable is
    maxed out `time_t` incapable of expressing a higher number.
    To fix this, I've upgraded the variables to `uint64_t`.
    
    I also had to replace a bunch of generated signatures to match the new
    "test.exe".
    
    Finally, I noticed that "ca.not_before" was being set to the token[8]
    instead of token[9], which presumably mean the "NotBefore" field for
    Trusted and Revoked Certificates was non-functional, as it was treating
    the "CertSign" boolean as the "NotBefore" value.
    
    Fixes: Cisco-Talos#1300
    micahsnyder committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    d11590f View commit details
    Browse the repository at this point in the history