diff --git a/Cargo.lock b/Cargo.lock index 82f099fba..101002f4b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,14 +25,14 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aesm-client" -version = "0.6.1" +version = "0.6.2" dependencies = [ "anyhow", "byteorder 1.3.4", "lazy_static", "libloading 0.5.2", "protobuf", - "protoc-rust", + "protobuf-codegen", "report-test", "sgx-isa 0.4.1", "sgxs", @@ -1341,17 +1341,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "getrandom" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.3" @@ -1397,7 +1386,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap", + "indexmap 2.7.1", "slab", "tokio", "tokio-util", @@ -1410,6 +1399,12 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.15.2" @@ -1766,6 +1761,16 @@ dependencies = [ name = "incoming_connection" version = "0.1.0" +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg 1.0.1", + "hashbrown 0.12.3", +] + [[package]] name = "indexmap" version = "2.7.1" @@ -1773,7 +1778,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.2", ] [[package]] @@ -1996,8 +2001,7 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "mbedtls" version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8114ab6c15889057a80479744eeb891e090ed2dd0258f13a7ef8ef02848293" +source = "git+https://github.com/fortanix/rust-mbedtls.git?branch=master#dabae2f742a8ccbd18028e4e048b9c2c95591a0a" dependencies = [ "bitflags 1.2.1", "byteorder 1.3.4", @@ -2014,9 +2018,8 @@ dependencies = [ [[package]] name = "mbedtls-platform-support" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85be113c8c2dc54cc6a5fba20130c7128f78dcb3ed0bb6797427333fa8cdb54d" +version = "0.1.1" +source = "git+https://github.com/fortanix/rust-mbedtls.git?branch=master#dabae2f742a8ccbd18028e4e048b9c2c95591a0a" dependencies = [ "cc", "cfg-if 1.0.0", @@ -2026,9 +2029,8 @@ dependencies = [ [[package]] name = "mbedtls-sys-auto" -version = "2.28.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a275cdc1fb027436be5ec1cc1c0043223c700c36062369b466d1a20a08e4f25" +version = "2.28.12" +source = "git+https://github.com/fortanix/rust-mbedtls.git?branch=master#dabae2f742a8ccbd18028e4e048b9c2c95591a0a" dependencies = [ "bindgen", "cc", @@ -2663,7 +2665,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 2.7.1", ] [[package]] @@ -2847,39 +2849,53 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.22.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b7f4a129bb3754c25a4e04032a90173c68f85168f77118ac4cb4936e7f06f92" +checksum = "58678a64de2fced2bdec6bca052a6716a0efe692d6e3f53d1bda6a1def64cfc0" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror", +] [[package]] name = "protobuf-codegen" -version = "2.22.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2fa3a461857508103b914da60dd7b489c1a834967c2e214ecc1496f0c486a" +checksum = "32777b0b3f6538d9d2e012b3fad85c7e4b9244b5958d04a6415f4333782b7a77" dependencies = [ + "anyhow", + "once_cell", "protobuf", + "protobuf-parse", + "regex", + "tempfile", + "thiserror", ] [[package]] -name = "protoc" -version = "2.22.1" +name = "protobuf-parse" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6653d384a260fedff0a466e894e05c5b8d75e261a14e9f93e81e43ef86cad23" +checksum = "96cb37955261126624a25b5e6bda40ae34cf3989d52a783087ca6091b29b5642" dependencies = [ + "anyhow", + "indexmap 1.9.3", "log 0.4.21", + "protobuf", + "protobuf-support", + "tempfile", + "thiserror", "which", ] [[package]] -name = "protoc-rust" -version = "2.22.1" +name = "protobuf-support" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5198afa8fca3f419b36db9a70ede51ff845938ef0386b49f4b02a5a322015a6" +checksum = "e1ed294a835b0f30810e13616b1cd34943c6d1e84a8f3b0dcfe466d256c3e7e7" dependencies = [ - "protobuf", - "protobuf-codegen", - "protoc", - "tempfile", + "thiserror", ] [[package]] @@ -2929,7 +2945,7 @@ dependencies = [ "libc", "rand_chacha 0.1.1", "rand_core 0.4.2", - "rand_hc 0.1.0", + "rand_hc", "rand_isaac", "rand_jitter", "rand_os", @@ -2938,19 +2954,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.15", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - [[package]] name = "rand" version = "0.8.5" @@ -2972,16 +2975,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -3007,15 +3000,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.15", -] - [[package]] name = "rand_core" version = "0.6.4" @@ -3034,15 +3018,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_isaac" version = "0.1.1" @@ -3105,12 +3080,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.10" @@ -3904,14 +3873,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", - "rand 0.7.3", - "redox_syscall 0.1.57", + "rand 0.8.5", + "redox_syscall 0.2.10", "remove_dir_all", "winapi", ] @@ -4128,7 +4097,7 @@ version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap", + "indexmap 2.7.1", "serde", "serde_spanned", "toml_datetime", @@ -4429,12 +4398,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.10.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index 02848e181..1d7310976 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,3 +57,4 @@ nix = { git = "https://github.com/fortanix/nix.git", branch = "raoul/fortanixvme rustc-serialize = { git = "https://github.com/fortanix/rustc-serialize.git", branch = "portability" } serde = { git = "https://github.com/fortanix/serde.git", branch = "master" } vsock = { git = "https://github.com/fortanix/vsock-rs.git", branch = "fortanixvme" } +mbedtls = { git = "https://github.com/fortanix/rust-mbedtls.git", branch = "master" } diff --git a/intel-sgx/aesm-client/Cargo.toml b/intel-sgx/aesm-client/Cargo.toml index 22aab2be6..5bab16d4f 100644 --- a/intel-sgx/aesm-client/Cargo.toml +++ b/intel-sgx/aesm-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aesm-client" -version = "0.6.1" +version = "0.6.2" authors = ["Fortanix, Inc."] license = "MPL-2.0" description = """ @@ -32,7 +32,7 @@ sgx-isa = { version = "0.4.0", path = "../sgx-isa"} # External dependencies byteorder = "1.0" # Unlicense/MIT lazy_static = "1" # MIT/Apache-2.0 -protobuf = "2.22.1" # MIT/Apache-2.0 +protobuf = "3" # MIT/Apache-2.0 thiserror = "1.0" # MIT/Apache-2.0 anyhow = "1.0" # MIT/Apache-2.0 @@ -50,7 +50,7 @@ winapi = { version = "0.3.7", features = ["combaseapi", "enclaveapi", "memoryapi libloading = "0.5.2" [build-dependencies] -protoc-rust = "2.8.0" # MIT/Apache-2.0 +protobuf-codegen = "3" # MIT [dev-dependencies] sgx-isa = { version = "0.4.0", path = "../sgx-isa" } diff --git a/intel-sgx/aesm-client/build.rs b/intel-sgx/aesm-client/build.rs index fb53cde46..c28c5c029 100644 --- a/intel-sgx/aesm-client/build.rs +++ b/intel-sgx/aesm-client/build.rs @@ -6,8 +6,6 @@ #![deny(warnings)] -extern crate protoc_rust; - use std::env; use std::fs::File; use std::io::Write; @@ -16,17 +14,17 @@ use std::path::PathBuf; fn main() { let out_dir = PathBuf::from(env::var("OUT_DIR").expect("cargo should set OUT_DIR")); - protoc_rust::Codegen::new() - .out_dir(&out_dir) + protobuf_codegen::Codegen::new() + .includes(&["src/"]) .input("src/aesm_proto.proto") - .run() - .expect("protoc"); + .cargo_out_dir("protos") + .run_from_script(); // Because of https://github.com/rust-lang/rfcs/issues/752, we can't `include!` the generated // protobufs directly. Instead, we generate a second generated file that can be `include!`-ed. // This trick borrowed from rust-mbedtls. - let mod_aesm_proto = out_dir.join("mod_aesm_proto.rs"); + let mod_aesm_proto = out_dir.join("protos").join("mod_aesm_proto.rs"); File::create(&mod_aesm_proto) // FIXME: get rid of `allow(bare_trait_objects)` by updateing protoc-rust .and_then(|mut f| f.write_all(b"#[allow(bare_trait_objects)] mod aesm_proto;\n")) diff --git a/intel-sgx/aesm-client/src/imp/aesm_protobuf/mod.rs b/intel-sgx/aesm-client/src/imp/aesm_protobuf/mod.rs index 1bcb2015c..6ef825f1d 100644 --- a/intel-sgx/aesm-client/src/imp/aesm_protobuf/mod.rs +++ b/intel-sgx/aesm-client/src/imp/aesm_protobuf/mod.rs @@ -1,12 +1,13 @@ use imp::AesmClient; pub use error::{Error, Result}; use protobuf::Message; +use std::convert::TryFrom; use std::io::{Read, Write}; use std::mem::size_of; use byteorder::{LittleEndian, NativeEndian, ReadBytesExt, WriteBytesExt}; +use request::{GetQuoteRequest, InitQuoteRequest, GetSupportedAttKeyIDNumRequest, GetSupportedAttKeyIDsRequest, InitQuoteExRequest, GetQuoteSizeExRequest, GetQuoteExRequest}; use { - quote_buffer_size, AesmRequest, FromResponse, QuoteInfo, QuoteResult, QuoteType, - Request_GetQuoteRequest, Request_InitQuoteRequest, Request_GetSupportedAttKeyIDNumRequest, Request_GetSupportedAttKeyIDsRequest, Request_InitQuoteExRequest, Request_GetQuoteSizeExRequest, Request_GetQuoteExRequest + quote_buffer_size, AesmRequest, QuoteInfo, QuoteResult, QuoteType }; // FIXME: remove conditional compilation after resolving https://github.com/fortanix/rust-sgx/issues/31 #[cfg(not(target_env = "sgx"))] @@ -54,12 +55,12 @@ impl AesmClient { let mut res_bytes = vec![0; res_len as usize]; sock.read_exact(&mut res_bytes)?; - let res = T::Response::from_response(Message::parse_from_bytes(&res_bytes))?; + let res = T::Response::try_from(Message::parse_from_bytes(&res_bytes))?; Ok(res) } pub fn init_quote(&self) -> Result { - let mut req = Request_InitQuoteRequest::new(); + let mut req = InitQuoteRequest::new(); req.set_timeout(REMOTE_AESM_TIMEOUT_US); let mut res = self.transact(req)?; @@ -76,7 +77,7 @@ impl AesmClient { quote_type: QuoteType, nonce: Vec, ) -> Result { - let mut req = Request_GetQuoteRequest::new(); + let mut req = GetQuoteRequest::new(); req.set_report(report); req.set_quote_type(quote_type.into()); req.set_spid(spid); @@ -115,16 +116,16 @@ impl AesmClient { const SGX_KEY_ID_SIZE : u32 = 256; #[allow(unused_mut)] - let mut req = Request_GetSupportedAttKeyIDNumRequest::new(); + let mut req = GetSupportedAttKeyIDNumRequest::new(); // FIXME: remove conditional compilation after resolving https://github.com/fortanix/rust-sgx/issues/31 #[cfg(not(target_env = "sgx"))] req.set_timeout(REMOTE_AESM_TIMEOUT_US); let res = self.transact(req)?; - let num_key_ids : u32 = res.get_att_key_id_num(); + let num_key_ids : u32 = res.att_key_id_num(); - let mut req = Request_GetSupportedAttKeyIDsRequest::new(); + let mut req = GetSupportedAttKeyIDsRequest::new(); // FIXME: remove conditional compilation after resolving https://github.com/fortanix/rust-sgx/issues/31 #[cfg(not(target_env = "sgx"))] @@ -148,7 +149,7 @@ impl AesmClient { // Similar functionality to sgx_init_quote_ex in page 165 at https://download.01.org/intel-sgx/sgx-linux/2.9.1/docs/Intel_SGX_Developer_Reference_Linux_2.9.1_Open_Source.pdf pub fn init_quote_ex(&self, att_key_id: Vec) -> Result { - let mut req = Request_InitQuoteExRequest::new(); + let mut req = InitQuoteExRequest::new(); // FIXME: remove conditional compilation after resolving https://github.com/fortanix/rust-sgx/issues/31 #[cfg(not(target_env = "sgx"))] @@ -158,9 +159,9 @@ impl AesmClient { req.set_b_pub_key_id(false); let res = self.transact(req)?; - let buf_size = res.get_pub_key_id_size(); + let buf_size = res.pub_key_id_size(); - let mut req = Request_InitQuoteExRequest::new(); + let mut req = InitQuoteExRequest::new(); req.set_att_key_id(att_key_id); req.set_b_pub_key_id(true); @@ -181,7 +182,7 @@ impl AesmClient { nonce: Vec ) -> Result { // First request - get the expected quote size for given key id. - let mut req = Request_GetQuoteSizeExRequest::new(); + let mut req = GetQuoteSizeExRequest::new(); // FIXME: remove conditional compilation after resolving https://github.com/fortanix/rust-sgx/issues/31 #[cfg(not(target_env = "sgx"))] @@ -193,10 +194,10 @@ impl AesmClient { if !res.has_quote_size() { return Err(Error::AesmBadResponse("Size is not provided by AESM Service in GetQuoteSizeEx reply".to_string())); } - let buf_size = res.get_quote_size(); + let buf_size = res.quote_size(); // second request - get the actual quote - let mut req = Request_GetQuoteExRequest::new(); + let mut req = GetQuoteExRequest::new(); // FIXME: remove conditional compilation after resolving https://github.com/fortanix/rust-sgx/issues/31 #[cfg(not(target_env = "sgx"))] diff --git a/intel-sgx/aesm-client/src/imp/unix.rs b/intel-sgx/aesm-client/src/imp/unix.rs index 0e04fe571..394b95f1f 100644 --- a/intel-sgx/aesm-client/src/imp/unix.rs +++ b/intel-sgx/aesm-client/src/imp/unix.rs @@ -12,7 +12,7 @@ pub use error::Result; mod aesm_protobuf; #[cfg(feature = "sgxs")] -use Request_GetLaunchTokenRequest; +use GetLaunchTokenRequest; #[derive(Clone, Debug, Default)] pub struct AesmClient { @@ -63,7 +63,7 @@ impl AesmClient { sigstruct: &Sigstruct, attributes: Attributes, ) -> Result> { - let mut req = Request_GetLaunchTokenRequest::new(); + let mut req = GetLaunchTokenRequest::new(); req.set_mr_enclave(sigstruct.enclavehash.to_vec()); // The field in the request protobuf is called mr_signer, but it wants the modulus. req.set_mr_signer(sigstruct.modulus.to_vec()); diff --git a/intel-sgx/aesm-client/src/lib.rs b/intel-sgx/aesm-client/src/lib.rs index 0ee897afb..848a4a8c2 100644 --- a/intel-sgx/aesm-client/src/lib.rs +++ b/intel-sgx/aesm-client/src/lib.rs @@ -40,16 +40,17 @@ extern crate unix_socket; extern crate winapi; extern crate sgx_isa; +use std::convert::TryFrom; #[cfg(feature = "sgxs")] use std::result::Result as StdResult; -use protobuf::ProtobufResult; #[cfg(feature = "sgxs")] use sgxs::einittoken::{Einittoken, EinittokenProvider}; #[cfg(all(not(target_env = "sgx"),feature = "sgxs"))] use sgx_isa::{Attributes, Sigstruct}; -include!(concat!(env!("OUT_DIR"), "/mod_aesm_proto.rs")); +use protobuf::{MessageField, Result as ProtobufResult}; +include!(concat!(env!("OUT_DIR"), "/protos/mod_aesm_proto.rs")); mod error; use self::aesm_proto::*; pub use error::{AesmError, Error, Result}; @@ -78,6 +79,9 @@ pub mod sgx { } } +use request::{GetQuoteExRequest, GetQuoteRequest, GetQuoteSizeExRequest, GetLaunchTokenRequest, GetSupportedAttKeyIDNumRequest, GetSupportedAttKeyIDsRequest, InitQuoteExRequest, InitQuoteRequest}; +use response::{GetSupportedAttKeyIDNumResponse, GetSupportedAttKeyIDsResponse, GetLaunchTokenResponse, GetQuoteSizeExResponse, GetQuoteExResponse, GetQuoteResponse, InitQuoteExResponse, InitQuoteResponse}; + // From SDK aesm_error.h const AESM_SUCCESS: u32 = 0; @@ -293,26 +297,21 @@ impl EinittokenProvider for AesmClient { } trait AesmRequest: protobuf::Message + Into { - type Response: protobuf::Message + FromResponse; + type Response: protobuf::Message + TryFrom, Error = Error>; #[cfg(not(target_env = "sgx"))] fn get_timeout(&self) -> Option; } -// This could be replaced with TryFrom when stable. -trait FromResponse: Sized { - fn from_response(res: ProtobufResult) -> Result; -} - macro_rules! define_aesm_message { - ($request:ident, $response:ident, $set:ident, $has:ident, $take:ident) => { + ($request:ident, $req_field:ident, $response:ident, $resp_field:ident) => { impl AesmRequest for $request { type Response = $response; #[cfg(not(target_env = "sgx"))] fn get_timeout(&self) -> Option { if self.has_timeout() { - Some(Self::get_timeout(self)) + Some($request::timeout(self)) } else { None } @@ -321,37 +320,35 @@ macro_rules! define_aesm_message { impl From<$request> for Request { fn from(r: $request) -> Request { let mut req = Request::new(); - req.$set(r); + req.$req_field = Some(r).into(); req } } - impl FromResponse for $response { - fn from_response(mut res: ProtobufResult) -> Result { - match res { - Ok(ref mut res) if res.$has() => { - let body = res.$take(); - match body.get_errorCode() { - AESM_SUCCESS => Ok(body), - code => Err(Error::aesm_code(code)), - } + impl TryFrom> for $response { + type Error = Error; + + fn try_from(res: ProtobufResult) -> Result { + if let Ok(Response { $resp_field: MessageField(Some(body)), .. }) = res { + match body.errorCode() { + AESM_SUCCESS => Ok(*body), + code => Err(Error::aesm_code(code)), } - _ => Err(Error::aesm_bad_response(stringify!($response))), + } else { + Err(Error::aesm_bad_response(stringify!($response))) } } } } } -define_aesm_message!(Request_GetQuoteRequest, Response_GetQuoteResponse, set_getQuoteReq, has_getQuoteRes, take_getQuoteRes); -define_aesm_message!(Request_InitQuoteRequest, Response_InitQuoteResponse, set_initQuoteReq, has_initQuoteRes, take_initQuoteRes); -define_aesm_message!(Request_GetLaunchTokenRequest, Response_GetLaunchTokenResponse, set_getLicTokenReq, has_getLicTokenRes, take_getLicTokenRes); - -define_aesm_message!(Request_GetQuoteExRequest, Response_GetQuoteExResponse, set_getQuoteExReq, has_getQuoteExRes, take_getQuoteExRes); -define_aesm_message!(Request_InitQuoteExRequest, Response_InitQuoteExResponse, set_initQuoteExReq, has_initQuoteExRes, take_initQuoteExRes); -define_aesm_message!(Request_GetQuoteSizeExRequest, Response_GetQuoteSizeExResponse, set_getQuoteSizeExReq, has_getQuoteSizeExRes, take_getQuoteSizeExRes); -define_aesm_message!(Request_GetSupportedAttKeyIDNumRequest, Response_GetSupportedAttKeyIDNumResponse, set_getSupportedAttKeyIDNumReq, has_getSupportedAttKeyIDNumRes, take_getSupportedAttKeyIDNumRes); -define_aesm_message!(Request_GetSupportedAttKeyIDsRequest, Response_GetSupportedAttKeyIDsResponse, set_getSupportedAttKeyIDsReq, has_getSupportedAttKeyIDsRes, take_getSupportedAttKeyIDsRes); - +define_aesm_message!(GetQuoteRequest, getQuoteReq, GetQuoteResponse, getQuoteRes); +define_aesm_message!(InitQuoteRequest, initQuoteReq, InitQuoteResponse, initQuoteRes); +define_aesm_message!(GetLaunchTokenRequest, getLicTokenReq, GetLaunchTokenResponse, getLicTokenRes); +define_aesm_message!(GetQuoteExRequest, getQuoteExReq, GetQuoteExResponse, getQuoteExRes); +define_aesm_message!(InitQuoteExRequest, initQuoteExReq, InitQuoteExResponse, initQuoteExRes); +define_aesm_message!(GetQuoteSizeExRequest, getQuoteSizeExReq, GetQuoteSizeExResponse, getQuoteSizeExRes); +define_aesm_message!(GetSupportedAttKeyIDNumRequest, getSupportedAttKeyIDNumReq, GetSupportedAttKeyIDNumResponse, getSupportedAttKeyIDNumRes); +define_aesm_message!(GetSupportedAttKeyIDsRequest, getSupportedAttKeyIDsReq, GetSupportedAttKeyIDsResponse, getSupportedAttKeyIDsRes); #[cfg(all(test, feature = "test-sgx"))] mod tests {