diff --git a/oak_sdk/containers/lib.rs b/oak_sdk/containers/lib.rs index 3479a1717f..8875c81428 100644 --- a/oak_sdk/containers/lib.rs +++ b/oak_sdk/containers/lib.rs @@ -16,4 +16,4 @@ pub use orchestrator_channel::default_orchestrator_channel; pub use orchestrator_client::OrchestratorClient; -pub use orchestrator_crypto_client::InstanceEncryptionKeyHandle; +pub use orchestrator_crypto_client::{InstanceEncryptionKeyHandle, InstanceSessionBinder}; diff --git a/oak_sdk/containers/orchestrator_crypto_client.rs b/oak_sdk/containers/orchestrator_crypto_client.rs index 8d099dc323..e23d861513 100644 --- a/oak_sdk/containers/orchestrator_crypto_client.rs +++ b/oak_sdk/containers/orchestrator_crypto_client.rs @@ -126,6 +126,14 @@ pub struct InstanceSessionBinder { } impl InstanceSessionBinder { + pub fn create(orchestrator_channel: &tonic::transport::Channel) -> Self { + Self { + orchestrator_crypto_client: Arc::new(OrchestratorCryptoClient::create( + orchestrator_channel, + )), + } + } + async fn bind_session(&self, transcript: &[u8]) -> anyhow::Result { self.orchestrator_crypto_client .bind_session(transcript, SESSION_BINDER_INFO_STRING.as_bytes())