-
Notifications
You must be signed in to change notification settings - Fork 51
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
only consume signature budgets during path building #186
Conversation
Previously we updated the `signed_data::verify_signed_data` fn to take a `Budget` so that it could directly consume the signature check budget at the place signature verification is done. While generally a good idea, in practice it means we can't expose signature validation operations on CRLs to crate external consumers that might want to use this functionality (e.g. to verify a CRL on disk has a valid issuer). The budget type is crate-private, and while we could open that up it would be awkward to require providing a budget in the context of validating a single item's signature. The budget concept is really only meaningful in the context of path building. This commit removes the `Budget` arg from the signature validation function, and the CRL trait's signature validation function, preferring to consume budget at the call-sites in `verify_cert` where we're doing path building.
Codecov Report
@@ Coverage Diff @@
## main #186 +/- ##
==========================================
+ Coverage 96.52% 96.53% +0.01%
==========================================
Files 19 19
Lines 4492 4507 +15
==========================================
+ Hits 4336 4351 +15
Misses 156 156
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I agree that it doesn't make much sense to expose the |
I'm going to pause this and think about some deeper changes to make this easier to work with. Separately I'll fix the immediate problem in the 0.101.x release. |
Closing this to pursue broader changes. |
I've put together a wip branch that I want to polish up a bit more + break into smaller commits but the general ideas are:
@djc I think that accomplishes what you were looking for. No need to look at my messy WIP branch, but if you had feedback on the general approach described above it would be helpful. I'll work on making this reviewable tomorrow. |
I think this might conflict with the ideas on how to move |
I think it's more complicated 😓 To make this pattern work we need to be able to accept a I'm starting to think the juice isn't worth the squeeze and perhaps we should land 834364c on |
Previously (#164) we updated the
signed_data::verify_signed_data
fn to take aBudget
so that it could directly consume the signature check budget at the place signature verification is done.While generally a good idea, in practice it means we can't expose signature validation operations on CRLs to crate external consumers that might want to use this functionality (e.g. to verify a CRL on disk has a valid issuer). The budget type is crate-private, and while we could open that up it would be awkward to require providing a budget in the context of validating a single item's signature. The budget concept is really only meaningful in the context of path building.
This commit removes the
Budget
arg from the signature validation function, and the CRL trait's signature validation function, preferring to consume budget at the call-sites inverify_cert
where we're doing path building.Related #185