tpm: Add socket module

Add SocketDev struct. Methods in SocketDev will be used to read & write
to Ctrl channel created by swtpm.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Co-authored-by: Sean Yoo <t-seanyoo@microsoft.com>
This commit is contained in:
Praveen K Paladugu
2022-09-09 03:31:56 +00:00
committed by Rob Bradford
parent e3213c8a79
commit 58b902d036
4 changed files with 153 additions and 0 deletions
+5
View File
@@ -3,6 +3,11 @@
// SPDX-License-Identifier: Apache-2.0
//
#[macro_use]
extern crate log;
pub mod socket;
use anyhow::anyhow;
use byteorder::{BigEndian, ReadBytesExt};
use std::convert::TryInto;