fdo-rs / fido-device-onboard-rs

An implementation of the FIDO Device Onboard (FDO) spec written in Rust.
BSD 3-Clause "New" or "Revised" License
63 stars 34 forks source link

fix(owner-tool): use the new API to export ovs #675

Closed runcom closed 1 month ago

runcom commented 1 month ago

This change allows the use of the new REST API to export either a single ov or multiple (tar-ed up). Tested with the following:

$ ./target/debug/fdo-owner-tool export-manufacturer-vouchers --device-guid ba934a85-d55e-4930-0595-faeaa6090ddf http://localhost:8080
$ ./target/debug/fdo-owner-tool export-manufacturer-vouchers --device-guid ba934a85-d55e-4930-0595-faeaa6090ddf --path /home/amurdaca http://localhost:8080
$ ./target/debug/fdo-owner-tool export-manufacturer-vouchers http://localhost:8080 
miabbott commented 1 month ago

I'd love to see some unit tests for this. We lacked unit tests in #673, too. We can do better! :muscle:

runcom commented 1 month ago

I'd love to see some unit tests for this. We lacked unit tests in #673, too. We can do better! 💪

these functionalities are (to me) better covered with functional tests (which both this and #673 already have) - the remaining part is rust's warp wrapping which I'm not sure we need to cover (as we already run the tool, effectively excercising the paths here)

runcom commented 1 month ago

ready for review now!