Skip to content

Commit d889956

Browse files
committed
Make oak_sdk_containers::crypto::InstanceSessionBinder public.
Commit f6837fb dropped `pub mod crypto` from the Oak Containers SDK, making the InstanceSessionBinder no longer public. It also made the OrchestratorCryptoClient private, so it's no longer possible for another crate to construct a InstanceSessionBinder. This change therefore adds a new constructor method patterned after InstanceEncryptionKeyHandle::create. Change-Id: Ic802dd40b4ff26b53ce8155ac8c5845fdd347c21
1 parent a44e24f commit d889956

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

oak_sdk/containers/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616

1717
pub use orchestrator_channel::default_orchestrator_channel;
1818
pub use orchestrator_client::OrchestratorClient;
19-
pub use orchestrator_crypto_client::InstanceEncryptionKeyHandle;
19+
pub use orchestrator_crypto_client::{InstanceEncryptionKeyHandle, InstanceSessionBinder};

oak_sdk/containers/orchestrator_crypto_client.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ pub struct InstanceSessionBinder {
126126
}
127127

128128
impl InstanceSessionBinder {
129+
pub fn create(orchestrator_channel: &tonic::transport::Channel) -> Self {
130+
Self {
131+
orchestrator_crypto_client: Arc::new(OrchestratorCryptoClient::create(
132+
orchestrator_channel,
133+
)),
134+
}
135+
}
136+
129137
async fn bind_session(&self, transcript: &[u8]) -> anyhow::Result<Signature> {
130138
self.orchestrator_crypto_client
131139
.bind_session(transcript, SESSION_BINDER_INFO_STRING.as_bytes())

0 commit comments

Comments
 (0)