Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
feat(rtc_types::enclave_messages::set_access_key) add Request::unseal…
Browse files Browse the repository at this point in the history
…ed_size field
  • Loading branch information
PiDelport committed Jul 8, 2021
1 parent 4a65406 commit afa7cf4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion codegen/auth_enclave/bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#define ARCHIVED_ENCLAVE_ID_SIZE 8

#define SET_ACCESS_KEY_REQUEST_SIZE 40
#define SET_ACCESS_KEY_REQUEST_SIZE 48

#define SET_ACCESS_KEY_RESPONSE_SIZE 1

Expand Down
2 changes: 1 addition & 1 deletion codegen/data_enclave/bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#define ARCHIVED_ENCLAVE_ID_SIZE 8

#define SET_ACCESS_KEY_REQUEST_SIZE 40
#define SET_ACCESS_KEY_REQUEST_SIZE 48

#define SET_ACCESS_KEY_RESPONSE_SIZE 1

Expand Down
2 changes: 1 addition & 1 deletion codegen/exec_enclave/bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#define ARCHIVED_ENCLAVE_ID_SIZE 8

#define SET_ACCESS_KEY_REQUEST_SIZE 40
#define SET_ACCESS_KEY_REQUEST_SIZE 48

#define SET_ACCESS_KEY_RESPONSE_SIZE 1

Expand Down
2 changes: 1 addition & 1 deletion rtc_types/src/enclave_messages/ffi_set_access_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub const ARCHIVED_ENCLAVE_ID_SIZE: usize = 8;
// (Keep these FFI type comments in sync between set_access_key and ffi_set_access_key, for diffing!)

// FFI type: REQUEST_SIZE
pub const SET_ACCESS_KEY_REQUEST_SIZE: usize = 40;
pub const SET_ACCESS_KEY_REQUEST_SIZE: usize = 48;

// FFI type: EncryptedRequest
#[repr(C)]
Expand Down
4 changes: 4 additions & 0 deletions rtc_types/src/enclave_messages/set_access_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ pub struct Request {
// It might make sense to conditionally export this as public.
pub uuid: [u8; 16], // TODO: Use UUID crate?
pub access_key: [u8; 24], // [u8; ACCESS_KEY_BYTES]

/// Size of the dataset in bytes, to be cached alongside the UUID.
pub unsealed_size: u64,
}

#[derive(Archive, Deserialize, Serialize, Debug, PartialEq)]
Expand Down Expand Up @@ -48,6 +51,7 @@ mod test {
let request = set_access_key::Request {
uuid: [5u8; 16],
access_key: [2u8; 24],
unsealed_size: 42,
};

let buf = rkyv_format::write_array(&request).unwrap();
Expand Down

0 comments on commit afa7cf4

Please sign in to comment.