Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #24 by allowing extra intermediates to be passed at verification
Piling on the tech debt -- this code could be improved, and perhaps I'll spend some time over the weekend doing so. But it works in my testing. I signed
certs/demo.layout
withtest/data/alice
after replacing the layout'srootcas
with a newly generated one frommake leaf_certs
. I removed the intermediates from the layout, and then ranmake test-run
.Afterward I ran
./bin/in-toto verify -i ./certs/example.com.intermediate.cert.pem -k ./test/data/alice.pub -l ./root.layout
and it verified successfully. I re-tried with./bin/in-toto verify -k ./test/data/alice.pub -l ./root.layout
, excluding the intermediate, and it failed as expected.I made some modifications to the cmd to ensure expected flags were required, as well.
This needs tests.