Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ tpm = ["dep:tss-esapi", "dep:tss-esapi-sys"]
# crypto-glue = { path = "../crypto-glue" }

[dependencies]
crypto-glue = "^0.1.6"
crypto-glue = "^0.1.16"
serde = { version = "^1.0", features = ["derive"] }
tracing = "^0.1.37"
tss-esapi-sys = { version = "0.5.0", optional = true, features = [
tss-esapi-sys = { version = "0.6.0-alpha.2", optional = true, features = [
"generate-bindings",
] }
tss-esapi = { version = "=8.0.0-alpha", optional = true }
tss-esapi = { version = "=8.0.0-alpha.2", optional = true, features = ["serde"] }

[dev-dependencies]
tracing-subscriber = { version = "^0.3.17", features = ["env-filter"] }
Expand Down
10 changes: 5 additions & 5 deletions src/provider/tss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ use tss_esapi::handles::ObjectHandle;
use tss_esapi::interface_types::algorithm::{HashingAlgorithm, PublicAlgorithm};
use tss_esapi::interface_types::ecc::EccCurve;
use tss_esapi::interface_types::key_bits::RsaKeyBits;
use tss_esapi::interface_types::resource_handles::Hierarchy;
use tss_esapi::interface_types::reserved_handles::Hierarchy;
use tss_esapi::interface_types::session_handles::AuthSession;
use tss_esapi::structures::SavedTpmContext;
use tss_esapi::structures::{Auth, Private, Public};
use tss_esapi::structures::{
CreateKeyResult, CreatePrimaryKeyResult, Data, Digest, EccPoint, EccScheme, HashScheme,
Expand All @@ -28,7 +29,6 @@ use tss_esapi::structures::{
SymmetricDefinition, SymmetricDefinitionObject,
};
use tss_esapi::tss2_esys::TPMT_TK_HASHCHECK;
use tss_esapi::utils::TpmsContext;
use tss_esapi::Context;
use tss_esapi::TctiNameConf;

Expand Down Expand Up @@ -236,7 +236,7 @@ impl TssTpm {

fn execute_with_temporary_object_context<F, T>(
&mut self,
tpms_context: TpmsContext,
tpms_context: SavedTpmContext,
f: F,
) -> Result<T, TpmError>
where
Expand Down Expand Up @@ -265,10 +265,10 @@ impl TssTpm {

fn execute_key_load_to_context(
&mut self,
parent_context: TpmsContext,
parent_context: SavedTpmContext,
private: Private,
public: Public,
) -> Result<TpmsContext, TpmError> {
) -> Result<SavedTpmContext, TpmError> {
// Load our private/public under our parent context, and immediately
// flush the parent handle from the context.
let key_handle = self.execute_with_temporary_object_context(
Expand Down
10 changes: 5 additions & 5 deletions src/structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use serde::{Deserialize, Serialize};
use tss_esapi::structures as tpm;

#[cfg(feature = "tpm")]
use tss_esapi::utils::TpmsContext;
use tss_esapi::structures::SavedTpmContext;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum LoadableStorageKey {
Expand Down Expand Up @@ -51,7 +51,7 @@ pub enum StorageKey {
},
#[cfg(feature = "tpm")]
Tpm {
key_context: TpmsContext,
key_context: SavedTpmContext,
},
#[cfg(not(feature = "tpm"))]
Tpm {
Expand Down Expand Up @@ -89,7 +89,7 @@ pub enum HmacS256Key {
},
#[cfg(feature = "tpm")]
Tpm {
key_context: TpmsContext,
key_context: SavedTpmContext,
},
#[cfg(not(feature = "tpm"))]
Tpm {
Expand Down Expand Up @@ -120,7 +120,7 @@ pub enum ES256Key {
},
#[cfg(feature = "tpm")]
Tpm {
key_context: TpmsContext,
key_context: SavedTpmContext,
},
#[cfg(not(feature = "tpm"))]
Tpm {
Expand Down Expand Up @@ -167,7 +167,7 @@ pub enum RS256Key {
},
#[cfg(feature = "tpm")]
Tpm {
key_context: TpmsContext,
key_context: SavedTpmContext,
},
#[cfg(not(feature = "tpm"))]
Tpm {
Expand Down