crosvm/tpm2
David Tolnay bf72b21f6f tpm: Add safe TPM simulator binding
This CL adds a TPM simulator based on tpm2-sys, similar to the one in
trunks:

    e4cf13c057/trunks/tpm_simulator_handle.cc

Intended usage:

    let mut simulator = tpm2::Simulator::singleton_in_current_directory();

    let command = &[ /* ... */ ];
    let response = simulator.execute_command(command);
    println!("{:?}", response);

TEST=cargo test
TEST=emerge-amd64-generic crosvm
BUG=chromium:911799

Change-Id: I142db1b7961f64f1765417533b8379b2601e20e0
Reviewed-on: https://chromium-review.googlesource.com/1396281
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2019-01-13 13:52:16 -08:00
..
src tpm: Add safe TPM simulator binding 2019-01-13 13:52:16 -08:00
Cargo.toml tpm: Add safe TPM simulator binding 2019-01-13 13:52:16 -08:00