-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add wrapping container for Quote3
and TcbInfoRaw
#99
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
❌ Unreviewed dependencies found
|
Codecov Report
@@ Coverage Diff @@
## main #99 +/- ##
==========================================
+ Coverage 97.90% 98.39% +0.49%
==========================================
Files 7 9 +2
Lines 2101 2311 +210
==========================================
+ Hits 2057 2274 +217
+ Misses 44 37 -7
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
732be90
to
e060ca2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise this looks fine to me. I like the verbose tree display thing and I like having an example output in the tests.
I don't feel like I can meaningfully comment on the quote types due to my lack of familiarity with the DCAP data types... but everything appears well documented and fairly easy to follow so I am okay with it getting merged if @cbeck88 agrees with that.
Having to manually construct that And<...>
type is indeed suboptimal but I also couldn't figure out a way to avoid it due to wanting to use multiple traits on that thing. So returning an impl Verifier<...>
or a Box<dyn Verifier...>
doesn't seem to work.
How would this look in clients? Would they have to construct all this And<>
stuff or is there going to be some standard verifier of some sort that we use in all our clients?
That is something I'm still unsure of. |
That might be possible with another trait that inherits the Verifier and tree display traits, and has a blanket implementation for everything that implements these two. Kinda hacky... |
e060ca2
to
c3d8a8e
Compare
Add a new wrapping container, `Evidence` that takes a `Quote3` and a `TcbInfoRaw`. The `Evidence` can be used with the majority of the `Verifier` implementations. This allows one to compose one verifier and use the `Evidence` in the `verify()` method.
c3d8a8e
to
5b62625
Compare
Add a new wrapping container,
Evidence
that takes aQuote3
and aTcbInfoRaw
. TheEvidence
can be used with the majority of theVerifier
implementations. This allows one to compose one verifier anduse the
Evidence
in theverify()
method.Motivation
When working on an example for the verifiers it felt like there was quite a bit of work clients needed to do to get things right. The intent is to make it less error prone and easier for clients to work with.
This change may likely need some discussion about if this path is the correct way to go.