mssun commented on a change in pull request #112: rewrite kms with prost
URL: https://github.com/apache/incubator-mesatee/pull/112#discussion_r351550226
 
 

 ##########
 File path: mesatee_services/tdfs/sgx_trusted_lib/src/tdfs_internal.rs
 ##########
 @@ -35,10 +35,14 @@ impl HandleRequest for CreateFileRequest {
     fn handle_request(&self) -> Result<DFSResponse> {
         let target = config::Internal::target_kms();
         let mut client = KMSClient::new(target)?;
-
-        let resp = client.request_create_key()?;
-        let key_id = resp.key_id;
-        let key_config = resp.config;
+        let req = 
kms_proto::proto::CreateKeyRequest::new(kms_proto::EncType::Aead);
+        let resp = client.create_key(req)?;
+        let key_id = resp.get_key_id();
+        let key_config = resp.get_key_config()?;
+        let key_config = match key_config {
+            kms_proto::KeyConfig::Aead(config) => 
kms_proto::proto::AeadConfig::from(config),
+            kms_proto::KeyConfig::ProtectedFs(_config) => unimplemented!(),
 
 Review comment:
   Add a comment to explain why it is unimplemented.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mesatee.apache.org
For additional commands, e-mail: dev-h...@mesatee.apache.org

Reply via email to