-
Notifications
You must be signed in to change notification settings - Fork 15
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 issues with certvalidator #13
Conversation
For item 2, I agree this is an issue with the library we're using, though I don't think this is an issue that hinders us (the error stems from the generator of the error message, so it's an exception anyway. I'm fiercely against pinning releases on GitHub commits as this doesn't work for setup.py and is unsuitable for installations that only want to download from PyPI. Therefore I would like you to remove this from the PR. For 1 I agree that this limitation is unnecessarily imposedd by the imported library, but are we running into any issues if someone is not setting the timestamp but forcing CRL checks (eg. for countersignatures)? Or is this better suited as a documentation thing? I can also imagine that there are some issues with revoked certificates after or before issuing of the (counter)signature and I'm not sure how to deal with those. |
|
I think that the solution you proposed for item number 1 is wrong: you are not passing the timestamp when we want to verify against the CRL. That means that the certificate will be invalid when it's after its expiry date, so we will invalidate certificates that are correctly timestamped to a date within its validity. Simply put, combining timestamped certificates with CRLs cannot be easily done. This is also mentioned in the PR you mentioned, and the example put there (when a certificate is expired it does not necessarily mean that a revoked certificate is still in the CRL) is a great one as to why I'm not accepting this PR at this time. We should first figure out how Microsoft proposes handling CRLs and such, as this can get quite convoluted: Are revoked certificates used for timestamped signatures to be considered revoked regardless of whether it was revoked before or after the timestamp? Do we trust CRLs to include revoked certificates that are also expired? Et cetera. For item number 2 I would propose you install the correct dependency in your environment directly (through requirements.txt) as signify does not prohibit you from installing other versions. I'm open to proposals to use other similar projects that offer functionality that can be used by signify to correctly verify certificates with timestamps. You are free to re-open the PR when you have any additional remarks. |
@ralphje Question - the way it is now, when I try to verify a PE with a timestamp, with |
I don't think that changing the sequence of events would make a large difference. We could add an option to ignore the countersignature in the Is that something that would help? |
That's actually a great idea which would help us in our scenarios (even though, as you said, it doesn't solve the general issue). We would greatly appreciate adding such an option to the |
There are some minor issues with certvalidator that need to be addressed:
ValueError: allow_fetching must be False when moment is specified
It does not allow to specify moment when allow_fetching is enabled (wbond/certvalidator#27).
I added a test to reproduce this. Fix is really simple, do not pass timestamp to ValidationContext if allow_fetching is set to True.
AttributeError: 'Void' object has no attribute 'human_friendly'
The verification in test_jameslth_revoked raises an exception, but it's not the one that it should be (wbond/certvalidator#26).
By default [email protected] is being installed - released 29 July 2016.
This error been fixed in wbond/certvalidator@80119e8 - commit from 9 May 2017.
I changed requirements.txt to force installation directly from GitHub.