Closed MatthiasValvekens closed 1 year ago
Patch coverage: 100.00
% and project coverage change: +0.01
:tada:
Comparison is base (
01a35a5
) 98.23% compared to head (329dec1
) 98.24%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
I looked at the changes. It seems like the 'proper' way to implement the feature. I cannot shake the feeling that this is an overkill for supporting functionality that was strongly discouraged in the previous spec and prohibited in the current one.
Still, this is your codebase and your rules - I can respect that. Thank you for putting in the effort. My only question is when do you sleep?
Thanks!
I looked at the changes. It seems like the 'proper' way to implement the feature. I cannot shake the feeling that this is an overkill for supporting functionality that was strongly discouraged in the previous spec and prohibited in the current one.
That's fair, but either way the AlgorithmUsagePolicy
interface might need some CMS-specific attention in the future anyway, so I don't mind the extra effort. :) I spent like an hour on this at most (plus some extra to diagnose an issue in an existing test).
FWIW, I plan to give these "policy objects" a more prominent place in the API going forward, as a way to gradually clean up the stateful mess that is ValidationContext
... Don't want to incur too much technical debt there :).
My only question is when do you sleep?
Having a baby in the house does strange things to one's circadian rhythm 🙃 ...
A small thing I noticed is that algorithm_usage_policy
argument in function validate_sig_integrity
is marked as optional, but in code it will always have a real value. The typing is not correct? (also see validate_raw
)
Also found a typo fix-typo.patch
A small thing I noticed is that algorithm_usage_policy argument in function validate_sig_integrity is marked as optional, but in code it will always have a real value. The typing is not correct? (also see validate_raw)
This is the way it is for historical reasons; there are a couple tests that predate the addition of the algo policy parameter, for example, and I have some experimental code lying around that calls validate_sig_integrity
directly. I'm not necessarily opposed to making it a required param, but it'd require some care to do it right.
I've applied and merged your other suggestion, though :)
Description of the changes
CMSAlgorithmUsagePolicy
ofAlgorithmUsagePolicy
for use with CMS validation specificallyCaveats
There is some minor API incompatibility, but only in internal APIs.
Checklist
Please go over this checklist to increase the chances of your PR being worked on in a timely manner. Deviations are allowed with proper justification (see previous section).
For new features (delete if not applicable)