Skip to content

Commit 7c0b815

Browse files
author
Juliette Pretot
committed
Move sessions logic into its own crate
remove unused deps format oak-prefix crate name for consistency fix typo
1 parent 0b8138d commit 7c0b815

File tree

11 files changed

+51
-18
lines changed

11 files changed

+51
-18
lines changed

Cargo.lock

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ members = [
4545
"oak_functions/util",
4646
"oak_idl",
4747
"remote_attestation/rust",
48+
"remote_attestation_sessions",
4849
"xtask",
4950
]
5051
exclude = [

experimental/uefi/proto/echo.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ syntax = "proto3";
1919
package oak.experimental.uefi;
2020

2121
message EchoRequest {
22-
bytes message = 1;
22+
bytes message = 1;
2323
}
2424

2525
message EchoResponse {
26-
bytes message = 1;
26+
bytes message = 1;
2727
}
2828

2929
service Echo {
30-
rpc Echo(EchoRequest) returns (EchoResponse) {}
30+
rpc Echo(EchoRequest) returns (EchoResponse) {}
3131
}

grpc_unary_attestation/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ license = "Apache-2.0"
77

88
[dependencies]
99
oak_remote_attestation = { path = "../remote_attestation/rust/" }
10+
oak_remote_attestation_sessions = { path = "../remote_attestation_sessions/" }
1011
oak_functions_abi = { path = "../oak_functions/abi/" }
1112
anyhow = "*"
1213
prost = "*"
@@ -19,6 +20,7 @@ tokio = { version = "*", features = [
1920
"sync",
2021
"rt-multi-thread"
2122
] }
23+
oak_utils = { path = "../oak_utils" }
2224
tonic = "*"
2325
tower = "*"
2426
rand = "*"

grpc_unary_attestation/src/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
use crate::proto::{unary_session_client::UnarySessionClient, UnaryRequest};
1818
use anyhow::Context;
1919
use oak_functions_abi;
20-
use oak_remote_attestation::{
21-
handshaker::{AttestationBehavior, ClientHandshaker, Encryptor, ServerIdentityVerifier},
22-
sessions::SessionId,
20+
use oak_remote_attestation::handshaker::{
21+
AttestationBehavior, ClientHandshaker, Encryptor, ServerIdentityVerifier,
2322
};
23+
use oak_remote_attestation_sessions::SessionId;
2424
use tonic::transport::Channel;
2525

2626
/// gRPC Attestation Service client implementation.

grpc_unary_attestation/src/server.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
//! protocol.
1919
2020
use crate::proto::{unary_session_server::UnarySession, UnaryRequest, UnaryResponse};
21-
use lru::LruCache;
22-
use oak_remote_attestation::sessions::{SessionId, SessionState, SessionTracker};
21+
use oak_remote_attestation_sessions::{SessionId, SessionState, SessionTracker};
2322
use oak_utils::LogError;
2423
use std::{convert::TryInto, sync::Mutex};
2524
use tonic;

oak_functions/loader/fuzz/Cargo.lock

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

remote_attestation/rust/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ bytes = { version = "*", default-features = false }
1515
log = "*"
1616
prost = { version = "*", default-features = false, features = ["prost-derive"] }
1717
ring = { path = "../../third_party/ring", default-features = false }
18-
lru = "*"
19-
oak_utils = { path = "../../oak_utils"}
2018

2119
[build-dependencies]
2220
prost-build = "*"

remote_attestation/rust/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ pub mod crypto;
2727
pub mod handshaker;
2828
pub mod message;
2929
pub mod report;
30-
pub mod sessions;
3130
#[cfg(test)]
3231
mod tests;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "oak_remote_attestation_sessions"
3+
version = "0.1.0"
4+
authors = ["Juliette Pretot <[email protected]>"]
5+
edition = "2021"
6+
license = "Apache-2.0"
7+
8+
[features]
9+
default = []
10+
11+
[dependencies]
12+
anyhow = { version = "*", default-features = false }
13+
oak_remote_attestation = { path = "../remote_attestation/rust/" }
14+
lru = "*"

0 commit comments

Comments
 (0)