lowRISC / manticore

Apache License 2.0
16 stars 13 forks source link

[cert] Add certificate parsing #79

Closed mcy closed 3 years ago

mcy commented 3 years ago

This PR adds a generic interface for parsing certificates as part of future trust chain processing.

For now, we only have X.509 parsing, but future PRs will add OpenDice-profiled, CBOR-encoded CWT certificates. While I really, really didn't want to write an X.509 parser, it seems unavoidable as a confluence of:

This PR isn't done; I still need to add unit tests and fuzz tests.

In the name of small CLs, fuzz tests and comprehensive parser tests will be in a followup.

mcy commented 3 years ago

Dear reviewer: this PR adds a number of test files and binary files generated from them. I suggest not reviewing anything other than the Rust files and the little script that generates the test data.