Browse Source

It compiles and links! (Excluded sealing code for testing LA)

dettanym 4 years ago
parent
commit
e97cec789f

+ 20 - 17
DeploymentStageLogic.cpp

@@ -3,10 +3,18 @@
 //
 
 #include "DeploymentStageLogic.h"
+#include "stdio.h"
+#include <errno.h>
+#include <string.h>
+
+// For socket programming
+#include <arpa/inet.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 
 // Sets up a socket connected to the port passed as input - returns the socket FD on success and -1 on error.
 // Also prints the errno on error.
-int set_up_socket_connect(int port)
+int DeploymentStageLogic::set_up_socket_connect(int port)
 {
     int sock = 0;
     if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
@@ -37,42 +45,37 @@ int set_up_socket_connect(int port)
     return sock;
 }
 
-void set_target_hash(uint8_t* given_hash)
+void DeploymentStageLogic::set_target_hash(uint8_t* given_hash)
 {
     uint32_t counter;
     for(counter=0; counter<32; counter++)
         target_hash[counter] = given_hash[counter];
 }
 
-int main_logic()
+int DeploymentStageLogic::main_logic(int decryptor_fd)
 {
-    int decryptor_fd;
     uint8_t key[16];
-    uint32_t ret_status
-
-    // Set up an IPC channel for local attestation and post-LA messages.
-    decryptor_fd = set_up_socket_connect(port);
-    if(decryptor_fd == -1)
-    {
-        printf("\nCould not set up the socket: had the following error: ");
-        fflush(stdout);
-        return 0x1;
-    }
+    uint32_t ret_status;
 
     // Conduct LA.
     ret_status = laInitiator.conduct_la(decryptor_fd);
     if(ret_status != 0)
         return ret_status;
+    /*
+     *
+      printf("\nSuccessful LA with port %d.\n", DECRYPTOR_PORT);
+      fflush(stdout);
+     */
 
     // Use the same channel for post-LA messages as the one used above for LA messages.
-    postLAMessaging.set_fd(decryptor_fd);
+    postLaMessaging.set_fd(decryptor_fd);
 
     // Use the symmetric key from LA to send messages for the rest of the deployment stage.
     laInitiator.get_la_symmetric_key(key);
-    postLAMessaging.set_la_symmetric_key(key);
+    postLaMessaging.set_la_symmetric_key(key);
 
     // Send the target's hash to the decryptor enclave.
-    return send_secure_msg(target_hash, 32);
+    return postLaMessaging.send_secure_msg(target_hash, 32);
 }
 
 

+ 32 - 13
LAInitiator/LA.cpp

@@ -1,29 +1,47 @@
-
-uint32_t LAInitiator_Protobuf::process_protobuf_dh_msg1_generate_protobuf_dh_msg2(protobuf_sgx_dh_msg1_t& protobuf_msg1, protobuf_sgx_dh_msg2_t& protobuf_msg2)
+#include "sgx_eid.h"
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+
+#include <stdio.h>
+
+#include "sgx_trts.h"
+#include "sgx_utils.h"
+#include "error_codes.h"
+#include "sgx_ecp_types.h"
+#include "sgx_thread.h"
+#include "sgx_tcrypto.h"
+#include "datatypes.h"
+#include "Transforms.h"
+#define MAX_SESSION_COUNT  16
+#define SGX_CAST(type, item) ((type)(item))
+#include <string.h>
+#include "crypto.h"
+#include "LA.h"
+uint32_t LA::process_protobuf_dh_msg1_generate_protobuf_dh_msg2(protobuf_sgx_dh_msg1_t& protobuf_msg1, protobuf_sgx_dh_msg2_t& protobuf_msg2)
 {
   sgx_dh_msg1_t dh_msg1;            //Diffie-Hellman Message 1
   sgx_dh_msg2_t dh_msg2;
   memset(&dh_msg1, 0, sizeof(sgx_dh_msg1_t));
   uint32_t ret_status;
 
-  if(Initiator_Transforms::decode_msg1_from_protobuf(protobuf_msg1, &dh_msg1)!=0)
+  if(Transforms::decode_msg1_from_protobuf(protobuf_msg1, &dh_msg1)!=0)
     return -1;
 
   //Intialize the session as a session initiator
-  ret_status = sgx_dh_init_session(SGX_DH_SESSION_INITIATOR, &sgx_dh_session);
+  ret_status = sgx_dh_init_session(SGX_DH_SESSION_INITIATOR, sgx_dh_session);
   if(ret_status != SGX_SUCCESS)
     return ret_status;
 
   //Process the message 1 obtained from desination enclave and generate message 2
-  ret_status = sgx_dh_initiator_proc_msg1(&dh_msg1, &dh_msg2, &sgx_dh_session);
+  ret_status = sgx_dh_initiator_proc_msg1(&dh_msg1, &dh_msg2, sgx_dh_session);
   if(ret_status != SGX_SUCCESS)
     return ret_status;
 
-  Initiator_Transforms::encode_msg2_to_protobuf(protobuf_msg2, &dh_msg2);
+  Transforms::encode_msg2_to_protobuf(protobuf_msg2, &dh_msg2);
   return 0;
 }
 
-uint32_t LAInitiator_Protobuf::process_protobuf_dh_msg3(protobuf_sgx_dh_msg3_t& protobuf_msg3) {
+uint32_t LA::process_protobuf_dh_msg3(protobuf_sgx_dh_msg3_t& protobuf_msg3) {
 
   uint32_t ret_status;
   sgx_dh_msg3_t dh_msg3;
@@ -32,25 +50,26 @@ uint32_t LAInitiator_Protobuf::process_protobuf_dh_msg3(protobuf_sgx_dh_msg3_t&
 
   memset(&dh_aek,0, sizeof(sgx_key_128bit_t));
 
-  if(Initiator_Transforms::decode_msg3_from_protobuf(protobuf_msg3, &dh_msg3)!=0)
+  if(Transforms::decode_msg3_from_protobuf(protobuf_msg3, &dh_msg3)!=0)
     return -1;
 
   //Process Message 3 obtained from the destination enclave
-  ret_status = sgx_dh_initiator_proc_msg3(&dh_msg3, &sgx_dh_session, &dh_aek, &responder_identity);
+  ret_status = sgx_dh_initiator_proc_msg3(&dh_msg3, sgx_dh_session, &dh_aek, &responder_identity);
   if(SGX_SUCCESS != ret_status)
     return ret_status;
 
-  memcpy(global_session_info.active.AEK, &dh_aek, sizeof(sgx_key_128bit_t));
+  //memcpy(global_session_info.active.AEK, &dh_aek, sizeof(sgx_key_128bit_t));
   memcpy(key, &dh_aek, sizeof(sgx_key_128bit_t));
-  global_session_info.session_id = 1; // TODO: session_id;
+  /*global_session_info.session_id = 1; // TODO: session_id;
   global_session_info.active.counter = 0;
   global_session_info.status = ACTIVE;
+   */
   memset(&dh_aek,0, sizeof(sgx_key_128bit_t));
 
   return 0;
 }
 
-uint32_t LAInitiator_Protobuf::conduct_la(int decryptor_fd) {
+uint32_t LA::conduct_la(int decryptor_fd) {
     // declare msg1, msg2, msg3 protobuf objects
     protobuf_sgx_dh_msg1_t protobuf_msg1;
     protobuf_sgx_dh_msg2_t protobuf_msg2;
@@ -84,7 +103,7 @@ uint32_t LAInitiator_Protobuf::conduct_la(int decryptor_fd) {
     return 0;
 }
 
-uint32_t LAInitiator_Protobuf::get_la_symmetric_key(uint8_t* op_key)
+void LA::get_la_symmetric_key(uint8_t* op_key)
 {
     uint32_t counter;
     for(counter=0; counter<32; counter++)

+ 8 - 6
Makefile

@@ -2,7 +2,8 @@ CXX             = g++
 RM              = rm -f
 PYTHON_CFLAGS = -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7  -Wdate-time #-fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security  -DNDEBUG -g -fwrapv 
 PYTHON_LDFLAGS = -L/usr/lib/python2.7/config-x86_64-linux-gnu  -lpython2.7   -lutil #-ldl -lm  #-Wl,-export-dynamic -Wl,-Bsymbolic-functions
-CXX_FLAGS       = -Wall  -O2 -std=c++11 -fpic -fdata-sections -ffunction-sections ${PYTHON_CFLAGS}
+CXX_FLAGS       = -Wall  -O2 -std=c++11 -fpic -fdata-sections -ffunction-sections
+#${PYTHON_CFLAGS}
 LD              = ${CXX} -v
 LD_FLAGS        = -Wall ${PYTHON_LDFLAGS}
 
@@ -27,10 +28,10 @@ Openssl_Path := /home/m2mazmud/plain-openssl
 
 Uae_Library_Name := sgx_uae_service
 
-all:	verifier ${OBJECTS}
+all:	verifier #${OBJECTS}
 
 clean:
-	${RM} *.obj *~* ${OBJECTS} verifier #${LocalAttestationCode_objects} ${LocalAttestationCode_ipc_objects} ${LocalAttestationCode_serialization_objects}
+	${RM} *.obj *~* systemMain.o DeploymentStageLogic.o LAInitiator/LA.o LAInitiator/Transforms.o PostLA/PostLAMessaging.o ProtobufAutogenerated/ProtobufLAMessages.pb.o ProtobufMessageRW.o crypto.o
 
 #DeploymentStageLogic.o: DeploymentStageLogic.cpp
 #	${CXX} -I./include ${CXX_FLAGS} -c $^ -o $@
@@ -39,7 +40,7 @@ LAInitiator/%.o: LAInitiator/%.cpp
 	${CXX} -I./include -I$(SGX_SDK)/include ${CXX_FLAGS} -c $^ -o $@
 
 PostLA/%.o: PostLA/%.cpp
-	${CXX} -I./include ${CXX_FLAGS} -c $^ -o $@
+	${CXX} -I./include -I$(SGX_SDK)/include ${CXX_FLAGS} -c $^ -o $@
 
 ProtobufAutogenerated/%.o: ProtobufAutogenerated/%.cpp
 	${CXX} -I./include ${CXX_FLAGS} -c $^ -o $@
@@ -51,9 +52,10 @@ ProtobufAutogenerated/%.o: ProtobufAutogenerated/%.cpp
 crypto.o: crypto.cpp 
 	${CXX} -I${Openssl_Path}/include ${CXX_FLAGS} -c $^ -o $@
 
-verifier:  systemMain.o DeploymentStageLogic.o systemSealerWrapper.o SgxSealer.o LAInitiator/LA.o LAInitiator/Transforms.o PostLA/PostLAMessaging.o ProtobufAutogenerated/ProtobufLAMessages.pb.o ProtobufMessageRW.o crypto.o
+verifier:  systemMain.o DeploymentStageLogic.o LAInitiator/LA.o LAInitiator/Transforms.o PostLA/PostLAMessaging.o ProtobufAutogenerated/ProtobufLAMessages.pb.o ProtobufMessageRW.o crypto.o
+#systemMain.o DeploymentStageLogic.o systemSealerWrapper.o SgxSealer.o LAInitiator/LA.o LAInitiator/Transforms.o PostLA/PostLAMessaging.o ProtobufAutogenerated/ProtobufLAMessages.pb.o ProtobufMessageRW.o crypto.o
 #	echo $(system_obj)
-	${CXX} -Wl,--no-undefined systemMain.o DeploymentStageLogic.o systemSealerWrapper.o SgxSealer.o LAInitiator/LA.o LAInitiator/Transforms.o PostLA/PostLAMessaging.o ProtobufAutogenerated/ProtobufLAMessages.pb.o ProtobufMessageRW.o crypto.o  -L${Openssl_Path}/lib -lcrypto -lssl -L./ -l$(Service_Library_Name) -l$(Crypto_Library_Name) -L/home/m2mazmud/linux-sgx-trts-modified/build/linux -lsgx_tstdc -lsgx_trts ${LD_FLAGS} -lprotobuf  -o $@
+	${CXX} -Wl,--no-undefined  systemMain.o DeploymentStageLogic.o LAInitiator/LA.o LAInitiator/Transforms.o PostLA/PostLAMessaging.o ProtobufAutogenerated/ProtobufLAMessages.pb.o ProtobufMessageRW.o crypto.o  -L${Openssl_Path}/lib -lcrypto -lssl -L./ -l$(Service_Library_Name) -l$(Crypto_Library_Name) -L/home/m2mazmud/linux-sgx-trts-modified/build/linux -lsgx_tstdc -lsgx_trts ${LD_FLAGS} -lprotobuf  -o $@
 #-L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm  
 #-L/home/m2mazmud/linux-sgx-trts-modified/build/linux -lsgx_tstdc -lsgx_trts ${LD_FLAGS} -o $@ 
 

+ 11 - 8
PostLA/PostLAMessaging.cpp

@@ -3,8 +3,10 @@
 //
 
 #include "PostLAMessaging.h"
+#include "sgx_trts.h" // for sgx_read_rand
+#include "crypto.h" // for aes_gcm_128
 
-uint32_t aes_gcm_wrapper(int enc, uint8_t* plaintext, uint32_t plaintext_length, uint8_t* ciphertext, uint32_t* ciphertext_length)
+uint32_t PostLAMessaging::aes_gcm_wrapper(int enc, uint8_t* plaintext, uint32_t plaintext_length, uint8_t* ciphertext, uint32_t* ciphertext_length)
 {
     uint32_t actual_plaintext_length=plaintext_length;
     uint8_t tag[16];uint32_t counter, return_status;
@@ -36,32 +38,33 @@ uint32_t aes_gcm_wrapper(int enc, uint8_t* plaintext, uint32_t plaintext_length,
 }
 
 // The verifier doesn't receive any messages (in the deployment stage or at all)
-uint32_t send_secure_msg(uint8_t* input, uint32_t input_size)
+uint32_t PostLAMessaging::send_secure_msg(uint8_t* input, uint32_t input_size)
 {
     uint8_t* output;
     uint32_t output_size, ret;
-    google::protobuf::MessageLite protobuf_msg;
 
-    output = (unsigned char*) malloc(output, input_size + 28); // 16 for tag, 12 for IV
+    output = (unsigned char*) malloc(input_size + 28); // 16 for tag, 12 for IV
     ret = aes_gcm_wrapper(1, input, input_size, output, &output_size );
     if(ret != 0)
         return ret;
 
     // TODO: Conversion logic to protobuf. Set msg or whatever.
-    if(protobufReaderWriter.write_msg(protobuf_msg) != 0)
+    /*  google::protobuf::MessageLite protobuf_msg;
+     * if(protobufReaderWriter->write_msg(protobuf_msg) != 0)
         return 0x3;
+    */
     return 0;
 }
 
-void set_la_symmetric_key(uint8_t* given_key) {
+void PostLAMessaging::set_la_symmetric_key(uint8_t* given_key) {
     uint32_t counter;
-    for(counter=0; counter<32; counter++)
+    for(counter=0; counter<16; counter++)
     {
         key[counter] = given_key[counter];
     }
 }
 
-void set_fd(int given_fd)
+void PostLAMessaging::set_fd(int given_fd)
 {
     protobufReaderWriter.set_fd(given_fd);
 }

+ 5 - 1
ProtobufMessageRW.cpp

@@ -3,6 +3,10 @@
 //
 
 #include "ProtobufMessageRW.h"
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/io/zero_copy_stream_impl.h>
+using namespace google::protobuf::io;
+
 int ProtobufMessageRW::read_msg(google::protobuf::MessageLite& message)
 {
     if(fd < 0)
@@ -61,6 +65,6 @@ int ProtobufMessageRW::write_msg(google::protobuf::MessageLite& message)
     return 0;
 }
 
-uint32_t ProtobufMessageRW::set_fd(int given_fd) {
+void ProtobufMessageRW::set_fd(int given_fd) {
     fd = given_fd;
 }

+ 1 - 1
crypto.cpp

@@ -133,7 +133,7 @@ void crypto_cleanup()
 }
 
 // Code adapted from here: https://wiki.openssl.org/index.php/EVP_Authenticated_Encryption_and_Decryption
-int aes_gcm_128(int enc, unsigned char *key, unsigned char *iv, unsigned char* plaintext, int plaintext_len, unsigned char *ciphertext,  int* op_ciphertext_len, unsigned char* tag)
+int aes_gcm_128(int enc, unsigned char *key, unsigned char *iv, unsigned char* plaintext, int plaintext_len, unsigned char *ciphertext,  uint32_t* op_ciphertext_len, unsigned char* tag)
 {
 	int len;
 	int ciphertext_len;

+ 4 - 9
include/DeploymentStageLogic.h

@@ -4,29 +4,24 @@
 
 #ifndef VERIFIER_DEPLOYMENTSTAGELOGIC_H
 #define VERIFIER_DEPLOYMENTSTAGELOGIC_H
-#include "stdio.h"
-// For socket programming
-#include <arpa/inet.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
 #include "PostLAMessaging.h"
-#include "LAInitiator_Protobuf.h"
+#include "LA.h"
+#include <stdint.h>
 
 
 class DeploymentStageLogic {
-    LAInitiator_Protobuf laInitiator;
+    LA laInitiator;
     PostLAMessaging postLaMessaging;
     uint8_t target_hash[32];
 
 public:
-    //    hash = {0x54,0x24,0x5d,0x63,0x5c,0x8f,0xec,0xcf,0x37,0xb9,0xcf,0x9e,0xb8,0xd3,0x22,0x04,0x57,0x5b,0xb2,0xfc,0xa6,0xd3,0x11,0xfb,0x87,0xb7,0x01,0x06,0x2f,0x18,0x25,0xc1};
     //	return_status=generate_rsa_keypair_hash(hash);
     //	if(return_status!=0)
     //		return return_status;
 
     void set_target_hash(uint8_t* given_hash);
     int set_up_socket_connect(int port);
-    int main_logic();
+    int main_logic(int fd);
 };
 
 

+ 26 - 0
include/LA.h

@@ -0,0 +1,26 @@
+//
+// Created by miti on 2019-12-21.
+//
+#ifndef VERIFIER_LA_H
+#define VERIFIER_LA_H
+#include "ProtobufMessageRW.h"
+#include "ProtobufLAMessages.h"
+
+struct _sgx_dh_session_t;
+typedef _sgx_dh_session_t sgx_dh_session_t;
+
+class LA {
+    sgx_dh_session_t* sgx_dh_session;
+    // dh_session_t global_session_info;
+    ProtobufMessageRW protobufReaderWriter;
+    uint8_t key[16];
+    uint32_t process_protobuf_dh_msg3(protobuf_sgx_dh_msg3_t& protobuf_msg3);
+    uint32_t process_protobuf_dh_msg1_generate_protobuf_dh_msg2(protobuf_sgx_dh_msg1_t& protobuf_msg1, protobuf_sgx_dh_msg2_t& protobuf_msg2);
+public:
+    uint32_t conduct_la(int fd);
+    void get_la_symmetric_key(uint8_t* key);
+};
+// TODO: Get them to take in lists as inputs and change verifier's code too to put in elements into a list.
+// TODO: Revert php code back by two commits (before rollback) and edit from there.
+// TODO: Also get the decryptor codebase in sync with this format of sgx/protobuf files.
+#endif //LAINITIATOR_PROTOBUFINTERFACE_H

+ 0 - 44
include/LAInitiator_Protobuf.h

@@ -1,44 +0,0 @@
-//
-// Created by miti on 2019-12-21.
-//
-
-#ifndef VERIFIER_LAINITIATOR_PROTOBUFINTERFACE_H
-#define VERIFIER_LAINITIATOR_PROTOBUFINTERFACE_H
-#include "sgx_eid.h"
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-#include "ProtobufLAMessages.h"
-#include <stdio.h>
-
-#include "sgx_trts.h"
-#include "sgx_utils.h"
-#include "error_codes.h"
-#include "sgx_ecp_types.h"
-#include "sgx_thread.h"
-#include <map>
-#include "sgx_dh.h"
-#include "dh_session_protocol.h"
-#include "sgx_tcrypto.h"
-#include "datatypes.h"
-#include "Initiator_Transforms.h"
-#define MAX_SESSION_COUNT  16
-#define SGX_CAST(type, item) ((type)(item))
-#include <string.h>
-#include "crypto.h"
-#include "ProtobufMessageRW.h"
-
-class LAInitiator_Protobuf {
-    sgx_dh_session_t sgx_dh_session;
-    dh_session_t global_session_info;
-    ProtobufMessageRW protobufReaderWriter;
-    uint8_t key[16];
-    uint32_t process_protobuf_dh_msg3(protobuf_sgx_dh_msg3_t& protobuf_msg3, uint32_t* session_id);
-    uint32_t process_protobuf_dh_msg1_generate_protobuf_dh_msg2(protobuf_sgx_dh_msg1_t& protobuf_msg1, protobuf_sgx_dh_msg2_t& protobuf_msg2, uint32_t* session_id);
-public:
-    uint32_t conduct_la();
-    uint32_t get_la_symmetric_key(uint8_t* key);
-};
-// TODO: Get them to take in lists as inputs and change verifier's code too to put in elements into a list.
-// TODO: Revert php code back by two commits (before rollback) and edit from there.
-// TODO: Also get the decryptor codebase in sync with this format of sgx/protobuf files.
-#endif //LAINITIATOR_PROTOBUFINTERFACE_H

+ 2 - 3
include/PostLAMessaging.h

@@ -4,8 +4,7 @@
 
 #ifndef VERIFIER_POSTLAMESSAGING_H
 #define VERIFIER_POSTLAMESSAGING_H
-#include "sgx_trts.h" // for sgx_read_rand
-#include "crypto.h"
+//#include "crypto.h"
 #include "ProtobufMessageRW.h"
 class PostLAMessaging {
     uint8_t key[16];
@@ -13,7 +12,7 @@ class PostLAMessaging {
     uint32_t aes_gcm_wrapper(int enc, uint8_t* plaintext, uint32_t plaintext_length, uint8_t* ciphertext, uint32_t* ciphertext_length);
 public:
     void set_la_symmetric_key(uint8_t* given_key);
-    void set_fd(uint8_t* given_fd);
+    void set_fd(int given_fd);
     uint32_t send_secure_msg(uint8_t* input, uint32_t input_size);
 };
 

+ 0 - 1
include/ProtobufLAInitiator.h

@@ -1 +0,0 @@
-int local_attestation_initiator(int port); 

+ 0 - 2324
include/ProtobufLAMessages.h

@@ -1,2324 +0,0 @@
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: dhmsgs.proto
-
-#ifndef PROTOBUF_dhmsgs_2eproto__INCLUDED
-#define PROTOBUF_dhmsgs_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 2006000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers.  Please update
-#error your headers.
-#endif
-#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers.  Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/message_lite.h>
-#include <google/protobuf/repeated_field.h>
-#include <google/protobuf/extension_set.h>
-// @@protoc_insertion_point(includes)
-
-// Internal implementation detail -- do not call these.
-void  protobuf_AddDesc_dhmsgs_2eproto();
-void protobuf_AssignDesc_dhmsgs_2eproto();
-void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-class protobuf_sgx_attributes_t;
-class protobuf_sgx_ec256_public_t;
-class protobuf_sgx_report_body_t;
-class protobuf_sgx_report_t;
-class protobuf_sgx_target_info_t;
-class protobuf_sgx_dh_msg1_t;
-class protobuf_sgx_dh_msg2_t;
-class protobuf_sgx_dh_msg3_body_t;
-class protobuf_sgx_dh_msg3_t;
-
-// ===================================================================
-
-class protobuf_sgx_attributes_t : public ::google::protobuf::MessageLite {
- public:
-  protobuf_sgx_attributes_t();
-  virtual ~protobuf_sgx_attributes_t();
-
-  protobuf_sgx_attributes_t(const protobuf_sgx_attributes_t& from);
-
-  inline protobuf_sgx_attributes_t& operator=(const protobuf_sgx_attributes_t& from) {
-    CopyFrom(from);
-    return *this;
-  }
-
-  inline const ::std::string& unknown_fields() const {
-    return _unknown_fields_;
-  }
-
-  inline ::std::string* mutable_unknown_fields() {
-    return &_unknown_fields_;
-  }
-
-  static const protobuf_sgx_attributes_t& default_instance();
-
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  // Returns the internal default instance pointer. This function can
-  // return NULL thus should not be used by the user. This is intended
-  // for Protobuf internal code. Please use default_instance() declared
-  // above instead.
-  static inline const protobuf_sgx_attributes_t* internal_default_instance() {
-    return default_instance_;
-  }
-  #endif
-
-  void Swap(protobuf_sgx_attributes_t* other);
-
-  // implements Message ----------------------------------------------
-
-  protobuf_sgx_attributes_t* New() const;
-  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
-  void CopyFrom(const protobuf_sgx_attributes_t& from);
-  void MergeFrom(const protobuf_sgx_attributes_t& from);
-  void Clear();
-  bool IsInitialized() const;
-
-  int ByteSize() const;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input);
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const;
-  void DiscardUnknownFields();
-  int GetCachedSize() const { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const;
-  public:
-  ::std::string GetTypeName() const;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // required uint64 flags = 1;
-  inline bool has_flags() const;
-  inline void clear_flags();
-  static const int kFlagsFieldNumber = 1;
-  inline ::google::protobuf::uint64 flags() const;
-  inline void set_flags(::google::protobuf::uint64 value);
-
-  // required uint64 xfrm = 2;
-  inline bool has_xfrm() const;
-  inline void clear_xfrm();
-  static const int kXfrmFieldNumber = 2;
-  inline ::google::protobuf::uint64 xfrm() const;
-  inline void set_xfrm(::google::protobuf::uint64 value);
-
-  // @@protoc_insertion_point(class_scope:protobuf_sgx_attributes_t)
- private:
-  inline void set_has_flags();
-  inline void clear_has_flags();
-  inline void set_has_xfrm();
-  inline void clear_has_xfrm();
-
-  ::std::string _unknown_fields_;
-
-  ::google::protobuf::uint32 _has_bits_[1];
-  mutable int _cached_size_;
-  ::google::protobuf::uint64 flags_;
-  ::google::protobuf::uint64 xfrm_;
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  friend void  protobuf_AddDesc_dhmsgs_2eproto_impl();
-  #else
-  friend void  protobuf_AddDesc_dhmsgs_2eproto();
-  #endif
-  friend void protobuf_AssignDesc_dhmsgs_2eproto();
-  friend void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-  void InitAsDefaultInstance();
-  static protobuf_sgx_attributes_t* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class protobuf_sgx_ec256_public_t : public ::google::protobuf::MessageLite {
- public:
-  protobuf_sgx_ec256_public_t();
-  virtual ~protobuf_sgx_ec256_public_t();
-
-  protobuf_sgx_ec256_public_t(const protobuf_sgx_ec256_public_t& from);
-
-  inline protobuf_sgx_ec256_public_t& operator=(const protobuf_sgx_ec256_public_t& from) {
-    CopyFrom(from);
-    return *this;
-  }
-
-  inline const ::std::string& unknown_fields() const {
-    return _unknown_fields_;
-  }
-
-  inline ::std::string* mutable_unknown_fields() {
-    return &_unknown_fields_;
-  }
-
-  static const protobuf_sgx_ec256_public_t& default_instance();
-
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  // Returns the internal default instance pointer. This function can
-  // return NULL thus should not be used by the user. This is intended
-  // for Protobuf internal code. Please use default_instance() declared
-  // above instead.
-  static inline const protobuf_sgx_ec256_public_t* internal_default_instance() {
-    return default_instance_;
-  }
-  #endif
-
-  void Swap(protobuf_sgx_ec256_public_t* other);
-
-  // implements Message ----------------------------------------------
-
-  protobuf_sgx_ec256_public_t* New() const;
-  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
-  void CopyFrom(const protobuf_sgx_ec256_public_t& from);
-  void MergeFrom(const protobuf_sgx_ec256_public_t& from);
-  void Clear();
-  bool IsInitialized() const;
-
-  int ByteSize() const;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input);
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const;
-  void DiscardUnknownFields();
-  int GetCachedSize() const { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const;
-  public:
-  ::std::string GetTypeName() const;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // repeated uint32 gx = 1 [packed = true];
-  inline int gx_size() const;
-  inline void clear_gx();
-  static const int kGxFieldNumber = 1;
-  inline ::google::protobuf::uint32 gx(int index) const;
-  inline void set_gx(int index, ::google::protobuf::uint32 value);
-  inline void add_gx(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      gx() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_gx();
-
-  // repeated uint32 gy = 2 [packed = true];
-  inline int gy_size() const;
-  inline void clear_gy();
-  static const int kGyFieldNumber = 2;
-  inline ::google::protobuf::uint32 gy(int index) const;
-  inline void set_gy(int index, ::google::protobuf::uint32 value);
-  inline void add_gy(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      gy() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_gy();
-
-  // @@protoc_insertion_point(class_scope:protobuf_sgx_ec256_public_t)
- private:
-
-  ::std::string _unknown_fields_;
-
-  ::google::protobuf::uint32 _has_bits_[1];
-  mutable int _cached_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > gx_;
-  mutable int _gx_cached_byte_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > gy_;
-  mutable int _gy_cached_byte_size_;
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  friend void  protobuf_AddDesc_dhmsgs_2eproto_impl();
-  #else
-  friend void  protobuf_AddDesc_dhmsgs_2eproto();
-  #endif
-  friend void protobuf_AssignDesc_dhmsgs_2eproto();
-  friend void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-  void InitAsDefaultInstance();
-  static protobuf_sgx_ec256_public_t* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class protobuf_sgx_report_body_t : public ::google::protobuf::MessageLite {
- public:
-  protobuf_sgx_report_body_t();
-  virtual ~protobuf_sgx_report_body_t();
-
-  protobuf_sgx_report_body_t(const protobuf_sgx_report_body_t& from);
-
-  inline protobuf_sgx_report_body_t& operator=(const protobuf_sgx_report_body_t& from) {
-    CopyFrom(from);
-    return *this;
-  }
-
-  inline const ::std::string& unknown_fields() const {
-    return _unknown_fields_;
-  }
-
-  inline ::std::string* mutable_unknown_fields() {
-    return &_unknown_fields_;
-  }
-
-  static const protobuf_sgx_report_body_t& default_instance();
-
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  // Returns the internal default instance pointer. This function can
-  // return NULL thus should not be used by the user. This is intended
-  // for Protobuf internal code. Please use default_instance() declared
-  // above instead.
-  static inline const protobuf_sgx_report_body_t* internal_default_instance() {
-    return default_instance_;
-  }
-  #endif
-
-  void Swap(protobuf_sgx_report_body_t* other);
-
-  // implements Message ----------------------------------------------
-
-  protobuf_sgx_report_body_t* New() const;
-  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
-  void CopyFrom(const protobuf_sgx_report_body_t& from);
-  void MergeFrom(const protobuf_sgx_report_body_t& from);
-  void Clear();
-  bool IsInitialized() const;
-
-  int ByteSize() const;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input);
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const;
-  void DiscardUnknownFields();
-  int GetCachedSize() const { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const;
-  public:
-  ::std::string GetTypeName() const;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // repeated uint32 cpu_svn = 1 [packed = true];
-  inline int cpu_svn_size() const;
-  inline void clear_cpu_svn();
-  static const int kCpuSvnFieldNumber = 1;
-  inline ::google::protobuf::uint32 cpu_svn(int index) const;
-  inline void set_cpu_svn(int index, ::google::protobuf::uint32 value);
-  inline void add_cpu_svn(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      cpu_svn() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_cpu_svn();
-
-  // required uint32 misc_select = 9;
-  inline bool has_misc_select() const;
-  inline void clear_misc_select();
-  static const int kMiscSelectFieldNumber = 9;
-  inline ::google::protobuf::uint32 misc_select() const;
-  inline void set_misc_select(::google::protobuf::uint32 value);
-
-  // repeated uint32 reserved1 = 2 [packed = true];
-  inline int reserved1_size() const;
-  inline void clear_reserved1();
-  static const int kReserved1FieldNumber = 2;
-  inline ::google::protobuf::uint32 reserved1(int index) const;
-  inline void set_reserved1(int index, ::google::protobuf::uint32 value);
-  inline void add_reserved1(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      reserved1() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_reserved1();
-
-  // required .protobuf_sgx_attributes_t attributes = 10;
-  inline bool has_attributes() const;
-  inline void clear_attributes();
-  static const int kAttributesFieldNumber = 10;
-  inline const ::protobuf_sgx_attributes_t& attributes() const;
-  inline ::protobuf_sgx_attributes_t* mutable_attributes();
-  inline ::protobuf_sgx_attributes_t* release_attributes();
-  inline void set_allocated_attributes(::protobuf_sgx_attributes_t* attributes);
-
-  // repeated uint32 mr_enclave = 3 [packed = true];
-  inline int mr_enclave_size() const;
-  inline void clear_mr_enclave();
-  static const int kMrEnclaveFieldNumber = 3;
-  inline ::google::protobuf::uint32 mr_enclave(int index) const;
-  inline void set_mr_enclave(int index, ::google::protobuf::uint32 value);
-  inline void add_mr_enclave(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      mr_enclave() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_mr_enclave();
-
-  // repeated uint32 reserved2 = 4 [packed = true];
-  inline int reserved2_size() const;
-  inline void clear_reserved2();
-  static const int kReserved2FieldNumber = 4;
-  inline ::google::protobuf::uint32 reserved2(int index) const;
-  inline void set_reserved2(int index, ::google::protobuf::uint32 value);
-  inline void add_reserved2(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      reserved2() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_reserved2();
-
-  // repeated uint32 mr_signer = 5 [packed = true];
-  inline int mr_signer_size() const;
-  inline void clear_mr_signer();
-  static const int kMrSignerFieldNumber = 5;
-  inline ::google::protobuf::uint32 mr_signer(int index) const;
-  inline void set_mr_signer(int index, ::google::protobuf::uint32 value);
-  inline void add_mr_signer(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      mr_signer() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_mr_signer();
-
-  // repeated uint32 reserved3 = 6 [packed = true];
-  inline int reserved3_size() const;
-  inline void clear_reserved3();
-  static const int kReserved3FieldNumber = 6;
-  inline ::google::protobuf::uint32 reserved3(int index) const;
-  inline void set_reserved3(int index, ::google::protobuf::uint32 value);
-  inline void add_reserved3(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      reserved3() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_reserved3();
-
-  // required uint32 isv_prod_id = 11;
-  inline bool has_isv_prod_id() const;
-  inline void clear_isv_prod_id();
-  static const int kIsvProdIdFieldNumber = 11;
-  inline ::google::protobuf::uint32 isv_prod_id() const;
-  inline void set_isv_prod_id(::google::protobuf::uint32 value);
-
-  // required uint32 isv_svn = 12;
-  inline bool has_isv_svn() const;
-  inline void clear_isv_svn();
-  static const int kIsvSvnFieldNumber = 12;
-  inline ::google::protobuf::uint32 isv_svn() const;
-  inline void set_isv_svn(::google::protobuf::uint32 value);
-
-  // repeated uint32 reserved4 = 7 [packed = true];
-  inline int reserved4_size() const;
-  inline void clear_reserved4();
-  static const int kReserved4FieldNumber = 7;
-  inline ::google::protobuf::uint32 reserved4(int index) const;
-  inline void set_reserved4(int index, ::google::protobuf::uint32 value);
-  inline void add_reserved4(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      reserved4() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_reserved4();
-
-  // repeated uint32 report_data = 8 [packed = true];
-  inline int report_data_size() const;
-  inline void clear_report_data();
-  static const int kReportDataFieldNumber = 8;
-  inline ::google::protobuf::uint32 report_data(int index) const;
-  inline void set_report_data(int index, ::google::protobuf::uint32 value);
-  inline void add_report_data(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      report_data() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_report_data();
-
-  // @@protoc_insertion_point(class_scope:protobuf_sgx_report_body_t)
- private:
-  inline void set_has_misc_select();
-  inline void clear_has_misc_select();
-  inline void set_has_attributes();
-  inline void clear_has_attributes();
-  inline void set_has_isv_prod_id();
-  inline void clear_has_isv_prod_id();
-  inline void set_has_isv_svn();
-  inline void clear_has_isv_svn();
-
-  ::std::string _unknown_fields_;
-
-  ::google::protobuf::uint32 _has_bits_[1];
-  mutable int _cached_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > cpu_svn_;
-  mutable int _cpu_svn_cached_byte_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > reserved1_;
-  mutable int _reserved1_cached_byte_size_;
-  ::protobuf_sgx_attributes_t* attributes_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > mr_enclave_;
-  mutable int _mr_enclave_cached_byte_size_;
-  ::google::protobuf::uint32 misc_select_;
-  ::google::protobuf::uint32 isv_prod_id_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > reserved2_;
-  mutable int _reserved2_cached_byte_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > mr_signer_;
-  mutable int _mr_signer_cached_byte_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > reserved3_;
-  mutable int _reserved3_cached_byte_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > reserved4_;
-  mutable int _reserved4_cached_byte_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > report_data_;
-  mutable int _report_data_cached_byte_size_;
-  ::google::protobuf::uint32 isv_svn_;
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  friend void  protobuf_AddDesc_dhmsgs_2eproto_impl();
-  #else
-  friend void  protobuf_AddDesc_dhmsgs_2eproto();
-  #endif
-  friend void protobuf_AssignDesc_dhmsgs_2eproto();
-  friend void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-  void InitAsDefaultInstance();
-  static protobuf_sgx_report_body_t* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class protobuf_sgx_report_t : public ::google::protobuf::MessageLite {
- public:
-  protobuf_sgx_report_t();
-  virtual ~protobuf_sgx_report_t();
-
-  protobuf_sgx_report_t(const protobuf_sgx_report_t& from);
-
-  inline protobuf_sgx_report_t& operator=(const protobuf_sgx_report_t& from) {
-    CopyFrom(from);
-    return *this;
-  }
-
-  inline const ::std::string& unknown_fields() const {
-    return _unknown_fields_;
-  }
-
-  inline ::std::string* mutable_unknown_fields() {
-    return &_unknown_fields_;
-  }
-
-  static const protobuf_sgx_report_t& default_instance();
-
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  // Returns the internal default instance pointer. This function can
-  // return NULL thus should not be used by the user. This is intended
-  // for Protobuf internal code. Please use default_instance() declared
-  // above instead.
-  static inline const protobuf_sgx_report_t* internal_default_instance() {
-    return default_instance_;
-  }
-  #endif
-
-  void Swap(protobuf_sgx_report_t* other);
-
-  // implements Message ----------------------------------------------
-
-  protobuf_sgx_report_t* New() const;
-  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
-  void CopyFrom(const protobuf_sgx_report_t& from);
-  void MergeFrom(const protobuf_sgx_report_t& from);
-  void Clear();
-  bool IsInitialized() const;
-
-  int ByteSize() const;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input);
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const;
-  void DiscardUnknownFields();
-  int GetCachedSize() const { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const;
-  public:
-  ::std::string GetTypeName() const;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // required .protobuf_sgx_report_body_t body = 1;
-  inline bool has_body() const;
-  inline void clear_body();
-  static const int kBodyFieldNumber = 1;
-  inline const ::protobuf_sgx_report_body_t& body() const;
-  inline ::protobuf_sgx_report_body_t* mutable_body();
-  inline ::protobuf_sgx_report_body_t* release_body();
-  inline void set_allocated_body(::protobuf_sgx_report_body_t* body);
-
-  // repeated uint32 key_id = 2 [packed = true];
-  inline int key_id_size() const;
-  inline void clear_key_id();
-  static const int kKeyIdFieldNumber = 2;
-  inline ::google::protobuf::uint32 key_id(int index) const;
-  inline void set_key_id(int index, ::google::protobuf::uint32 value);
-  inline void add_key_id(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      key_id() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_key_id();
-
-  // repeated uint32 mac = 3 [packed = true];
-  inline int mac_size() const;
-  inline void clear_mac();
-  static const int kMacFieldNumber = 3;
-  inline ::google::protobuf::uint32 mac(int index) const;
-  inline void set_mac(int index, ::google::protobuf::uint32 value);
-  inline void add_mac(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      mac() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_mac();
-
-  // @@protoc_insertion_point(class_scope:protobuf_sgx_report_t)
- private:
-  inline void set_has_body();
-  inline void clear_has_body();
-
-  ::std::string _unknown_fields_;
-
-  ::google::protobuf::uint32 _has_bits_[1];
-  mutable int _cached_size_;
-  ::protobuf_sgx_report_body_t* body_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > key_id_;
-  mutable int _key_id_cached_byte_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > mac_;
-  mutable int _mac_cached_byte_size_;
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  friend void  protobuf_AddDesc_dhmsgs_2eproto_impl();
-  #else
-  friend void  protobuf_AddDesc_dhmsgs_2eproto();
-  #endif
-  friend void protobuf_AssignDesc_dhmsgs_2eproto();
-  friend void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-  void InitAsDefaultInstance();
-  static protobuf_sgx_report_t* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class protobuf_sgx_target_info_t : public ::google::protobuf::MessageLite {
- public:
-  protobuf_sgx_target_info_t();
-  virtual ~protobuf_sgx_target_info_t();
-
-  protobuf_sgx_target_info_t(const protobuf_sgx_target_info_t& from);
-
-  inline protobuf_sgx_target_info_t& operator=(const protobuf_sgx_target_info_t& from) {
-    CopyFrom(from);
-    return *this;
-  }
-
-  inline const ::std::string& unknown_fields() const {
-    return _unknown_fields_;
-  }
-
-  inline ::std::string* mutable_unknown_fields() {
-    return &_unknown_fields_;
-  }
-
-  static const protobuf_sgx_target_info_t& default_instance();
-
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  // Returns the internal default instance pointer. This function can
-  // return NULL thus should not be used by the user. This is intended
-  // for Protobuf internal code. Please use default_instance() declared
-  // above instead.
-  static inline const protobuf_sgx_target_info_t* internal_default_instance() {
-    return default_instance_;
-  }
-  #endif
-
-  void Swap(protobuf_sgx_target_info_t* other);
-
-  // implements Message ----------------------------------------------
-
-  protobuf_sgx_target_info_t* New() const;
-  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
-  void CopyFrom(const protobuf_sgx_target_info_t& from);
-  void MergeFrom(const protobuf_sgx_target_info_t& from);
-  void Clear();
-  bool IsInitialized() const;
-
-  int ByteSize() const;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input);
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const;
-  void DiscardUnknownFields();
-  int GetCachedSize() const { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const;
-  public:
-  ::std::string GetTypeName() const;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // repeated uint32 mr_enclave = 1 [packed = true];
-  inline int mr_enclave_size() const;
-  inline void clear_mr_enclave();
-  static const int kMrEnclaveFieldNumber = 1;
-  inline ::google::protobuf::uint32 mr_enclave(int index) const;
-  inline void set_mr_enclave(int index, ::google::protobuf::uint32 value);
-  inline void add_mr_enclave(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      mr_enclave() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_mr_enclave();
-
-  // required .protobuf_sgx_attributes_t attributes = 4;
-  inline bool has_attributes() const;
-  inline void clear_attributes();
-  static const int kAttributesFieldNumber = 4;
-  inline const ::protobuf_sgx_attributes_t& attributes() const;
-  inline ::protobuf_sgx_attributes_t* mutable_attributes();
-  inline ::protobuf_sgx_attributes_t* release_attributes();
-  inline void set_allocated_attributes(::protobuf_sgx_attributes_t* attributes);
-
-  // repeated uint32 reserved1 = 2 [packed = true];
-  inline int reserved1_size() const;
-  inline void clear_reserved1();
-  static const int kReserved1FieldNumber = 2;
-  inline ::google::protobuf::uint32 reserved1(int index) const;
-  inline void set_reserved1(int index, ::google::protobuf::uint32 value);
-  inline void add_reserved1(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      reserved1() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_reserved1();
-
-  // required uint32 misc_select = 5;
-  inline bool has_misc_select() const;
-  inline void clear_misc_select();
-  static const int kMiscSelectFieldNumber = 5;
-  inline ::google::protobuf::uint32 misc_select() const;
-  inline void set_misc_select(::google::protobuf::uint32 value);
-
-  // repeated uint32 reserved2 = 3 [packed = true];
-  inline int reserved2_size() const;
-  inline void clear_reserved2();
-  static const int kReserved2FieldNumber = 3;
-  inline ::google::protobuf::uint32 reserved2(int index) const;
-  inline void set_reserved2(int index, ::google::protobuf::uint32 value);
-  inline void add_reserved2(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      reserved2() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_reserved2();
-
-  // @@protoc_insertion_point(class_scope:protobuf_sgx_target_info_t)
- private:
-  inline void set_has_attributes();
-  inline void clear_has_attributes();
-  inline void set_has_misc_select();
-  inline void clear_has_misc_select();
-
-  ::std::string _unknown_fields_;
-
-  ::google::protobuf::uint32 _has_bits_[1];
-  mutable int _cached_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > mr_enclave_;
-  mutable int _mr_enclave_cached_byte_size_;
-  ::protobuf_sgx_attributes_t* attributes_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > reserved1_;
-  mutable int _reserved1_cached_byte_size_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > reserved2_;
-  mutable int _reserved2_cached_byte_size_;
-  ::google::protobuf::uint32 misc_select_;
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  friend void  protobuf_AddDesc_dhmsgs_2eproto_impl();
-  #else
-  friend void  protobuf_AddDesc_dhmsgs_2eproto();
-  #endif
-  friend void protobuf_AssignDesc_dhmsgs_2eproto();
-  friend void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-  void InitAsDefaultInstance();
-  static protobuf_sgx_target_info_t* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class protobuf_sgx_dh_msg1_t : public ::google::protobuf::MessageLite {
- public:
-  protobuf_sgx_dh_msg1_t();
-  virtual ~protobuf_sgx_dh_msg1_t();
-
-  protobuf_sgx_dh_msg1_t(const protobuf_sgx_dh_msg1_t& from);
-
-  inline protobuf_sgx_dh_msg1_t& operator=(const protobuf_sgx_dh_msg1_t& from) {
-    CopyFrom(from);
-    return *this;
-  }
-
-  inline const ::std::string& unknown_fields() const {
-    return _unknown_fields_;
-  }
-
-  inline ::std::string* mutable_unknown_fields() {
-    return &_unknown_fields_;
-  }
-
-  static const protobuf_sgx_dh_msg1_t& default_instance();
-
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  // Returns the internal default instance pointer. This function can
-  // return NULL thus should not be used by the user. This is intended
-  // for Protobuf internal code. Please use default_instance() declared
-  // above instead.
-  static inline const protobuf_sgx_dh_msg1_t* internal_default_instance() {
-    return default_instance_;
-  }
-  #endif
-
-  void Swap(protobuf_sgx_dh_msg1_t* other);
-
-  // implements Message ----------------------------------------------
-
-  protobuf_sgx_dh_msg1_t* New() const;
-  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
-  void CopyFrom(const protobuf_sgx_dh_msg1_t& from);
-  void MergeFrom(const protobuf_sgx_dh_msg1_t& from);
-  void Clear();
-  bool IsInitialized() const;
-
-  int ByteSize() const;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input);
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const;
-  void DiscardUnknownFields();
-  int GetCachedSize() const { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const;
-  public:
-  ::std::string GetTypeName() const;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // required .protobuf_sgx_ec256_public_t g_a = 1;
-  inline bool has_g_a() const;
-  inline void clear_g_a();
-  static const int kGAFieldNumber = 1;
-  inline const ::protobuf_sgx_ec256_public_t& g_a() const;
-  inline ::protobuf_sgx_ec256_public_t* mutable_g_a();
-  inline ::protobuf_sgx_ec256_public_t* release_g_a();
-  inline void set_allocated_g_a(::protobuf_sgx_ec256_public_t* g_a);
-
-  // required .protobuf_sgx_target_info_t target = 2;
-  inline bool has_target() const;
-  inline void clear_target();
-  static const int kTargetFieldNumber = 2;
-  inline const ::protobuf_sgx_target_info_t& target() const;
-  inline ::protobuf_sgx_target_info_t* mutable_target();
-  inline ::protobuf_sgx_target_info_t* release_target();
-  inline void set_allocated_target(::protobuf_sgx_target_info_t* target);
-
-  // @@protoc_insertion_point(class_scope:protobuf_sgx_dh_msg1_t)
- private:
-  inline void set_has_g_a();
-  inline void clear_has_g_a();
-  inline void set_has_target();
-  inline void clear_has_target();
-
-  ::std::string _unknown_fields_;
-
-  ::google::protobuf::uint32 _has_bits_[1];
-  mutable int _cached_size_;
-  ::protobuf_sgx_ec256_public_t* g_a_;
-  ::protobuf_sgx_target_info_t* target_;
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  friend void  protobuf_AddDesc_dhmsgs_2eproto_impl();
-  #else
-  friend void  protobuf_AddDesc_dhmsgs_2eproto();
-  #endif
-  friend void protobuf_AssignDesc_dhmsgs_2eproto();
-  friend void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-  void InitAsDefaultInstance();
-  static protobuf_sgx_dh_msg1_t* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class protobuf_sgx_dh_msg2_t : public ::google::protobuf::MessageLite {
- public:
-  protobuf_sgx_dh_msg2_t();
-  virtual ~protobuf_sgx_dh_msg2_t();
-
-  protobuf_sgx_dh_msg2_t(const protobuf_sgx_dh_msg2_t& from);
-
-  inline protobuf_sgx_dh_msg2_t& operator=(const protobuf_sgx_dh_msg2_t& from) {
-    CopyFrom(from);
-    return *this;
-  }
-
-  inline const ::std::string& unknown_fields() const {
-    return _unknown_fields_;
-  }
-
-  inline ::std::string* mutable_unknown_fields() {
-    return &_unknown_fields_;
-  }
-
-  static const protobuf_sgx_dh_msg2_t& default_instance();
-
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  // Returns the internal default instance pointer. This function can
-  // return NULL thus should not be used by the user. This is intended
-  // for Protobuf internal code. Please use default_instance() declared
-  // above instead.
-  static inline const protobuf_sgx_dh_msg2_t* internal_default_instance() {
-    return default_instance_;
-  }
-  #endif
-
-  void Swap(protobuf_sgx_dh_msg2_t* other);
-
-  // implements Message ----------------------------------------------
-
-  protobuf_sgx_dh_msg2_t* New() const;
-  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
-  void CopyFrom(const protobuf_sgx_dh_msg2_t& from);
-  void MergeFrom(const protobuf_sgx_dh_msg2_t& from);
-  void Clear();
-  bool IsInitialized() const;
-
-  int ByteSize() const;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input);
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const;
-  void DiscardUnknownFields();
-  int GetCachedSize() const { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const;
-  public:
-  ::std::string GetTypeName() const;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // required .protobuf_sgx_ec256_public_t g_b = 1;
-  inline bool has_g_b() const;
-  inline void clear_g_b();
-  static const int kGBFieldNumber = 1;
-  inline const ::protobuf_sgx_ec256_public_t& g_b() const;
-  inline ::protobuf_sgx_ec256_public_t* mutable_g_b();
-  inline ::protobuf_sgx_ec256_public_t* release_g_b();
-  inline void set_allocated_g_b(::protobuf_sgx_ec256_public_t* g_b);
-
-  // required .protobuf_sgx_report_t report = 2;
-  inline bool has_report() const;
-  inline void clear_report();
-  static const int kReportFieldNumber = 2;
-  inline const ::protobuf_sgx_report_t& report() const;
-  inline ::protobuf_sgx_report_t* mutable_report();
-  inline ::protobuf_sgx_report_t* release_report();
-  inline void set_allocated_report(::protobuf_sgx_report_t* report);
-
-  // repeated uint32 cmac = 3 [packed = true];
-  inline int cmac_size() const;
-  inline void clear_cmac();
-  static const int kCmacFieldNumber = 3;
-  inline ::google::protobuf::uint32 cmac(int index) const;
-  inline void set_cmac(int index, ::google::protobuf::uint32 value);
-  inline void add_cmac(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      cmac() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_cmac();
-
-  // @@protoc_insertion_point(class_scope:protobuf_sgx_dh_msg2_t)
- private:
-  inline void set_has_g_b();
-  inline void clear_has_g_b();
-  inline void set_has_report();
-  inline void clear_has_report();
-
-  ::std::string _unknown_fields_;
-
-  ::google::protobuf::uint32 _has_bits_[1];
-  mutable int _cached_size_;
-  ::protobuf_sgx_ec256_public_t* g_b_;
-  ::protobuf_sgx_report_t* report_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > cmac_;
-  mutable int _cmac_cached_byte_size_;
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  friend void  protobuf_AddDesc_dhmsgs_2eproto_impl();
-  #else
-  friend void  protobuf_AddDesc_dhmsgs_2eproto();
-  #endif
-  friend void protobuf_AssignDesc_dhmsgs_2eproto();
-  friend void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-  void InitAsDefaultInstance();
-  static protobuf_sgx_dh_msg2_t* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class protobuf_sgx_dh_msg3_body_t : public ::google::protobuf::MessageLite {
- public:
-  protobuf_sgx_dh_msg3_body_t();
-  virtual ~protobuf_sgx_dh_msg3_body_t();
-
-  protobuf_sgx_dh_msg3_body_t(const protobuf_sgx_dh_msg3_body_t& from);
-
-  inline protobuf_sgx_dh_msg3_body_t& operator=(const protobuf_sgx_dh_msg3_body_t& from) {
-    CopyFrom(from);
-    return *this;
-  }
-
-  inline const ::std::string& unknown_fields() const {
-    return _unknown_fields_;
-  }
-
-  inline ::std::string* mutable_unknown_fields() {
-    return &_unknown_fields_;
-  }
-
-  static const protobuf_sgx_dh_msg3_body_t& default_instance();
-
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  // Returns the internal default instance pointer. This function can
-  // return NULL thus should not be used by the user. This is intended
-  // for Protobuf internal code. Please use default_instance() declared
-  // above instead.
-  static inline const protobuf_sgx_dh_msg3_body_t* internal_default_instance() {
-    return default_instance_;
-  }
-  #endif
-
-  void Swap(protobuf_sgx_dh_msg3_body_t* other);
-
-  // implements Message ----------------------------------------------
-
-  protobuf_sgx_dh_msg3_body_t* New() const;
-  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
-  void CopyFrom(const protobuf_sgx_dh_msg3_body_t& from);
-  void MergeFrom(const protobuf_sgx_dh_msg3_body_t& from);
-  void Clear();
-  bool IsInitialized() const;
-
-  int ByteSize() const;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input);
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const;
-  void DiscardUnknownFields();
-  int GetCachedSize() const { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const;
-  public:
-  ::std::string GetTypeName() const;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // required .protobuf_sgx_report_t report = 1;
-  inline bool has_report() const;
-  inline void clear_report();
-  static const int kReportFieldNumber = 1;
-  inline const ::protobuf_sgx_report_t& report() const;
-  inline ::protobuf_sgx_report_t* mutable_report();
-  inline ::protobuf_sgx_report_t* release_report();
-  inline void set_allocated_report(::protobuf_sgx_report_t* report);
-
-  // repeated uint32 additional_prop = 2;
-  inline int additional_prop_size() const;
-  inline void clear_additional_prop();
-  static const int kAdditionalPropFieldNumber = 2;
-  inline ::google::protobuf::uint32 additional_prop(int index) const;
-  inline void set_additional_prop(int index, ::google::protobuf::uint32 value);
-  inline void add_additional_prop(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      additional_prop() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_additional_prop();
-
-  // @@protoc_insertion_point(class_scope:protobuf_sgx_dh_msg3_body_t)
- private:
-  inline void set_has_report();
-  inline void clear_has_report();
-
-  ::std::string _unknown_fields_;
-
-  ::google::protobuf::uint32 _has_bits_[1];
-  mutable int _cached_size_;
-  ::protobuf_sgx_report_t* report_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > additional_prop_;
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  friend void  protobuf_AddDesc_dhmsgs_2eproto_impl();
-  #else
-  friend void  protobuf_AddDesc_dhmsgs_2eproto();
-  #endif
-  friend void protobuf_AssignDesc_dhmsgs_2eproto();
-  friend void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-  void InitAsDefaultInstance();
-  static protobuf_sgx_dh_msg3_body_t* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class protobuf_sgx_dh_msg3_t : public ::google::protobuf::MessageLite {
- public:
-  protobuf_sgx_dh_msg3_t();
-  virtual ~protobuf_sgx_dh_msg3_t();
-
-  protobuf_sgx_dh_msg3_t(const protobuf_sgx_dh_msg3_t& from);
-
-  inline protobuf_sgx_dh_msg3_t& operator=(const protobuf_sgx_dh_msg3_t& from) {
-    CopyFrom(from);
-    return *this;
-  }
-
-  inline const ::std::string& unknown_fields() const {
-    return _unknown_fields_;
-  }
-
-  inline ::std::string* mutable_unknown_fields() {
-    return &_unknown_fields_;
-  }
-
-  static const protobuf_sgx_dh_msg3_t& default_instance();
-
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  // Returns the internal default instance pointer. This function can
-  // return NULL thus should not be used by the user. This is intended
-  // for Protobuf internal code. Please use default_instance() declared
-  // above instead.
-  static inline const protobuf_sgx_dh_msg3_t* internal_default_instance() {
-    return default_instance_;
-  }
-  #endif
-
-  void Swap(protobuf_sgx_dh_msg3_t* other);
-
-  // implements Message ----------------------------------------------
-
-  protobuf_sgx_dh_msg3_t* New() const;
-  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
-  void CopyFrom(const protobuf_sgx_dh_msg3_t& from);
-  void MergeFrom(const protobuf_sgx_dh_msg3_t& from);
-  void Clear();
-  bool IsInitialized() const;
-
-  int ByteSize() const;
-  bool MergePartialFromCodedStream(
-      ::google::protobuf::io::CodedInputStream* input);
-  void SerializeWithCachedSizes(
-      ::google::protobuf::io::CodedOutputStream* output) const;
-  void DiscardUnknownFields();
-  int GetCachedSize() const { return _cached_size_; }
-  private:
-  void SharedCtor();
-  void SharedDtor();
-  void SetCachedSize(int size) const;
-  public:
-  ::std::string GetTypeName() const;
-
-  // nested types ----------------------------------------------------
-
-  // accessors -------------------------------------------------------
-
-  // required .protobuf_sgx_dh_msg3_body_t msg3_body = 1;
-  inline bool has_msg3_body() const;
-  inline void clear_msg3_body();
-  static const int kMsg3BodyFieldNumber = 1;
-  inline const ::protobuf_sgx_dh_msg3_body_t& msg3_body() const;
-  inline ::protobuf_sgx_dh_msg3_body_t* mutable_msg3_body();
-  inline ::protobuf_sgx_dh_msg3_body_t* release_msg3_body();
-  inline void set_allocated_msg3_body(::protobuf_sgx_dh_msg3_body_t* msg3_body);
-
-  // repeated uint32 cmac = 2 [packed = true];
-  inline int cmac_size() const;
-  inline void clear_cmac();
-  static const int kCmacFieldNumber = 2;
-  inline ::google::protobuf::uint32 cmac(int index) const;
-  inline void set_cmac(int index, ::google::protobuf::uint32 value);
-  inline void add_cmac(::google::protobuf::uint32 value);
-  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-      cmac() const;
-  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-      mutable_cmac();
-
-  // @@protoc_insertion_point(class_scope:protobuf_sgx_dh_msg3_t)
- private:
-  inline void set_has_msg3_body();
-  inline void clear_has_msg3_body();
-
-  ::std::string _unknown_fields_;
-
-  ::google::protobuf::uint32 _has_bits_[1];
-  mutable int _cached_size_;
-  ::protobuf_sgx_dh_msg3_body_t* msg3_body_;
-  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > cmac_;
-  mutable int _cmac_cached_byte_size_;
-  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  friend void  protobuf_AddDesc_dhmsgs_2eproto_impl();
-  #else
-  friend void  protobuf_AddDesc_dhmsgs_2eproto();
-  #endif
-  friend void protobuf_AssignDesc_dhmsgs_2eproto();
-  friend void protobuf_ShutdownFile_dhmsgs_2eproto();
-
-  void InitAsDefaultInstance();
-  static protobuf_sgx_dh_msg3_t* default_instance_;
-};
-// ===================================================================
-
-
-// ===================================================================
-
-// protobuf_sgx_attributes_t
-
-// required uint64 flags = 1;
-inline bool protobuf_sgx_attributes_t::has_flags() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void protobuf_sgx_attributes_t::set_has_flags() {
-  _has_bits_[0] |= 0x00000001u;
-}
-inline void protobuf_sgx_attributes_t::clear_has_flags() {
-  _has_bits_[0] &= ~0x00000001u;
-}
-inline void protobuf_sgx_attributes_t::clear_flags() {
-  flags_ = GOOGLE_ULONGLONG(0);
-  clear_has_flags();
-}
-inline ::google::protobuf::uint64 protobuf_sgx_attributes_t::flags() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_attributes_t.flags)
-  return flags_;
-}
-inline void protobuf_sgx_attributes_t::set_flags(::google::protobuf::uint64 value) {
-  set_has_flags();
-  flags_ = value;
-  // @@protoc_insertion_point(field_set:protobuf_sgx_attributes_t.flags)
-}
-
-// required uint64 xfrm = 2;
-inline bool protobuf_sgx_attributes_t::has_xfrm() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void protobuf_sgx_attributes_t::set_has_xfrm() {
-  _has_bits_[0] |= 0x00000002u;
-}
-inline void protobuf_sgx_attributes_t::clear_has_xfrm() {
-  _has_bits_[0] &= ~0x00000002u;
-}
-inline void protobuf_sgx_attributes_t::clear_xfrm() {
-  xfrm_ = GOOGLE_ULONGLONG(0);
-  clear_has_xfrm();
-}
-inline ::google::protobuf::uint64 protobuf_sgx_attributes_t::xfrm() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_attributes_t.xfrm)
-  return xfrm_;
-}
-inline void protobuf_sgx_attributes_t::set_xfrm(::google::protobuf::uint64 value) {
-  set_has_xfrm();
-  xfrm_ = value;
-  // @@protoc_insertion_point(field_set:protobuf_sgx_attributes_t.xfrm)
-}
-
-// -------------------------------------------------------------------
-
-// protobuf_sgx_ec256_public_t
-
-// repeated uint32 gx = 1 [packed = true];
-inline int protobuf_sgx_ec256_public_t::gx_size() const {
-  return gx_.size();
-}
-inline void protobuf_sgx_ec256_public_t::clear_gx() {
-  gx_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_ec256_public_t::gx(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_ec256_public_t.gx)
-  return gx_.Get(index);
-}
-inline void protobuf_sgx_ec256_public_t::set_gx(int index, ::google::protobuf::uint32 value) {
-  gx_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_ec256_public_t.gx)
-}
-inline void protobuf_sgx_ec256_public_t::add_gx(::google::protobuf::uint32 value) {
-  gx_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_ec256_public_t.gx)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_ec256_public_t::gx() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_ec256_public_t.gx)
-  return gx_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_ec256_public_t::mutable_gx() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_ec256_public_t.gx)
-  return &gx_;
-}
-
-// repeated uint32 gy = 2 [packed = true];
-inline int protobuf_sgx_ec256_public_t::gy_size() const {
-  return gy_.size();
-}
-inline void protobuf_sgx_ec256_public_t::clear_gy() {
-  gy_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_ec256_public_t::gy(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_ec256_public_t.gy)
-  return gy_.Get(index);
-}
-inline void protobuf_sgx_ec256_public_t::set_gy(int index, ::google::protobuf::uint32 value) {
-  gy_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_ec256_public_t.gy)
-}
-inline void protobuf_sgx_ec256_public_t::add_gy(::google::protobuf::uint32 value) {
-  gy_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_ec256_public_t.gy)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_ec256_public_t::gy() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_ec256_public_t.gy)
-  return gy_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_ec256_public_t::mutable_gy() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_ec256_public_t.gy)
-  return &gy_;
-}
-
-// -------------------------------------------------------------------
-
-// protobuf_sgx_report_body_t
-
-// repeated uint32 cpu_svn = 1 [packed = true];
-inline int protobuf_sgx_report_body_t::cpu_svn_size() const {
-  return cpu_svn_.size();
-}
-inline void protobuf_sgx_report_body_t::clear_cpu_svn() {
-  cpu_svn_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::cpu_svn(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.cpu_svn)
-  return cpu_svn_.Get(index);
-}
-inline void protobuf_sgx_report_body_t::set_cpu_svn(int index, ::google::protobuf::uint32 value) {
-  cpu_svn_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.cpu_svn)
-}
-inline void protobuf_sgx_report_body_t::add_cpu_svn(::google::protobuf::uint32 value) {
-  cpu_svn_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_body_t.cpu_svn)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_body_t::cpu_svn() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_body_t.cpu_svn)
-  return cpu_svn_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_body_t::mutable_cpu_svn() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_body_t.cpu_svn)
-  return &cpu_svn_;
-}
-
-// required uint32 misc_select = 9;
-inline bool protobuf_sgx_report_body_t::has_misc_select() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void protobuf_sgx_report_body_t::set_has_misc_select() {
-  _has_bits_[0] |= 0x00000002u;
-}
-inline void protobuf_sgx_report_body_t::clear_has_misc_select() {
-  _has_bits_[0] &= ~0x00000002u;
-}
-inline void protobuf_sgx_report_body_t::clear_misc_select() {
-  misc_select_ = 0u;
-  clear_has_misc_select();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::misc_select() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.misc_select)
-  return misc_select_;
-}
-inline void protobuf_sgx_report_body_t::set_misc_select(::google::protobuf::uint32 value) {
-  set_has_misc_select();
-  misc_select_ = value;
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.misc_select)
-}
-
-// repeated uint32 reserved1 = 2 [packed = true];
-inline int protobuf_sgx_report_body_t::reserved1_size() const {
-  return reserved1_.size();
-}
-inline void protobuf_sgx_report_body_t::clear_reserved1() {
-  reserved1_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::reserved1(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.reserved1)
-  return reserved1_.Get(index);
-}
-inline void protobuf_sgx_report_body_t::set_reserved1(int index, ::google::protobuf::uint32 value) {
-  reserved1_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.reserved1)
-}
-inline void protobuf_sgx_report_body_t::add_reserved1(::google::protobuf::uint32 value) {
-  reserved1_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_body_t.reserved1)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_body_t::reserved1() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_body_t.reserved1)
-  return reserved1_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_body_t::mutable_reserved1() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_body_t.reserved1)
-  return &reserved1_;
-}
-
-// required .protobuf_sgx_attributes_t attributes = 10;
-inline bool protobuf_sgx_report_body_t::has_attributes() const {
-  return (_has_bits_[0] & 0x00000008u) != 0;
-}
-inline void protobuf_sgx_report_body_t::set_has_attributes() {
-  _has_bits_[0] |= 0x00000008u;
-}
-inline void protobuf_sgx_report_body_t::clear_has_attributes() {
-  _has_bits_[0] &= ~0x00000008u;
-}
-inline void protobuf_sgx_report_body_t::clear_attributes() {
-  if (attributes_ != NULL) attributes_->::protobuf_sgx_attributes_t::Clear();
-  clear_has_attributes();
-}
-inline const ::protobuf_sgx_attributes_t& protobuf_sgx_report_body_t::attributes() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.attributes)
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  return attributes_ != NULL ? *attributes_ : *default_instance().attributes_;
-#else
-  return attributes_ != NULL ? *attributes_ : *default_instance_->attributes_;
-#endif
-}
-inline ::protobuf_sgx_attributes_t* protobuf_sgx_report_body_t::mutable_attributes() {
-  set_has_attributes();
-  if (attributes_ == NULL) attributes_ = new ::protobuf_sgx_attributes_t;
-  // @@protoc_insertion_point(field_mutable:protobuf_sgx_report_body_t.attributes)
-  return attributes_;
-}
-inline ::protobuf_sgx_attributes_t* protobuf_sgx_report_body_t::release_attributes() {
-  clear_has_attributes();
-  ::protobuf_sgx_attributes_t* temp = attributes_;
-  attributes_ = NULL;
-  return temp;
-}
-inline void protobuf_sgx_report_body_t::set_allocated_attributes(::protobuf_sgx_attributes_t* attributes) {
-  delete attributes_;
-  attributes_ = attributes;
-  if (attributes) {
-    set_has_attributes();
-  } else {
-    clear_has_attributes();
-  }
-  // @@protoc_insertion_point(field_set_allocated:protobuf_sgx_report_body_t.attributes)
-}
-
-// repeated uint32 mr_enclave = 3 [packed = true];
-inline int protobuf_sgx_report_body_t::mr_enclave_size() const {
-  return mr_enclave_.size();
-}
-inline void protobuf_sgx_report_body_t::clear_mr_enclave() {
-  mr_enclave_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::mr_enclave(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.mr_enclave)
-  return mr_enclave_.Get(index);
-}
-inline void protobuf_sgx_report_body_t::set_mr_enclave(int index, ::google::protobuf::uint32 value) {
-  mr_enclave_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.mr_enclave)
-}
-inline void protobuf_sgx_report_body_t::add_mr_enclave(::google::protobuf::uint32 value) {
-  mr_enclave_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_body_t.mr_enclave)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_body_t::mr_enclave() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_body_t.mr_enclave)
-  return mr_enclave_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_body_t::mutable_mr_enclave() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_body_t.mr_enclave)
-  return &mr_enclave_;
-}
-
-// repeated uint32 reserved2 = 4 [packed = true];
-inline int protobuf_sgx_report_body_t::reserved2_size() const {
-  return reserved2_.size();
-}
-inline void protobuf_sgx_report_body_t::clear_reserved2() {
-  reserved2_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::reserved2(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.reserved2)
-  return reserved2_.Get(index);
-}
-inline void protobuf_sgx_report_body_t::set_reserved2(int index, ::google::protobuf::uint32 value) {
-  reserved2_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.reserved2)
-}
-inline void protobuf_sgx_report_body_t::add_reserved2(::google::protobuf::uint32 value) {
-  reserved2_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_body_t.reserved2)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_body_t::reserved2() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_body_t.reserved2)
-  return reserved2_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_body_t::mutable_reserved2() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_body_t.reserved2)
-  return &reserved2_;
-}
-
-// repeated uint32 mr_signer = 5 [packed = true];
-inline int protobuf_sgx_report_body_t::mr_signer_size() const {
-  return mr_signer_.size();
-}
-inline void protobuf_sgx_report_body_t::clear_mr_signer() {
-  mr_signer_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::mr_signer(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.mr_signer)
-  return mr_signer_.Get(index);
-}
-inline void protobuf_sgx_report_body_t::set_mr_signer(int index, ::google::protobuf::uint32 value) {
-  mr_signer_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.mr_signer)
-}
-inline void protobuf_sgx_report_body_t::add_mr_signer(::google::protobuf::uint32 value) {
-  mr_signer_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_body_t.mr_signer)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_body_t::mr_signer() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_body_t.mr_signer)
-  return mr_signer_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_body_t::mutable_mr_signer() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_body_t.mr_signer)
-  return &mr_signer_;
-}
-
-// repeated uint32 reserved3 = 6 [packed = true];
-inline int protobuf_sgx_report_body_t::reserved3_size() const {
-  return reserved3_.size();
-}
-inline void protobuf_sgx_report_body_t::clear_reserved3() {
-  reserved3_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::reserved3(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.reserved3)
-  return reserved3_.Get(index);
-}
-inline void protobuf_sgx_report_body_t::set_reserved3(int index, ::google::protobuf::uint32 value) {
-  reserved3_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.reserved3)
-}
-inline void protobuf_sgx_report_body_t::add_reserved3(::google::protobuf::uint32 value) {
-  reserved3_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_body_t.reserved3)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_body_t::reserved3() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_body_t.reserved3)
-  return reserved3_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_body_t::mutable_reserved3() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_body_t.reserved3)
-  return &reserved3_;
-}
-
-// required uint32 isv_prod_id = 11;
-inline bool protobuf_sgx_report_body_t::has_isv_prod_id() const {
-  return (_has_bits_[0] & 0x00000100u) != 0;
-}
-inline void protobuf_sgx_report_body_t::set_has_isv_prod_id() {
-  _has_bits_[0] |= 0x00000100u;
-}
-inline void protobuf_sgx_report_body_t::clear_has_isv_prod_id() {
-  _has_bits_[0] &= ~0x00000100u;
-}
-inline void protobuf_sgx_report_body_t::clear_isv_prod_id() {
-  isv_prod_id_ = 0u;
-  clear_has_isv_prod_id();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::isv_prod_id() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.isv_prod_id)
-  return isv_prod_id_;
-}
-inline void protobuf_sgx_report_body_t::set_isv_prod_id(::google::protobuf::uint32 value) {
-  set_has_isv_prod_id();
-  isv_prod_id_ = value;
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.isv_prod_id)
-}
-
-// required uint32 isv_svn = 12;
-inline bool protobuf_sgx_report_body_t::has_isv_svn() const {
-  return (_has_bits_[0] & 0x00000200u) != 0;
-}
-inline void protobuf_sgx_report_body_t::set_has_isv_svn() {
-  _has_bits_[0] |= 0x00000200u;
-}
-inline void protobuf_sgx_report_body_t::clear_has_isv_svn() {
-  _has_bits_[0] &= ~0x00000200u;
-}
-inline void protobuf_sgx_report_body_t::clear_isv_svn() {
-  isv_svn_ = 0u;
-  clear_has_isv_svn();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::isv_svn() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.isv_svn)
-  return isv_svn_;
-}
-inline void protobuf_sgx_report_body_t::set_isv_svn(::google::protobuf::uint32 value) {
-  set_has_isv_svn();
-  isv_svn_ = value;
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.isv_svn)
-}
-
-// repeated uint32 reserved4 = 7 [packed = true];
-inline int protobuf_sgx_report_body_t::reserved4_size() const {
-  return reserved4_.size();
-}
-inline void protobuf_sgx_report_body_t::clear_reserved4() {
-  reserved4_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::reserved4(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.reserved4)
-  return reserved4_.Get(index);
-}
-inline void protobuf_sgx_report_body_t::set_reserved4(int index, ::google::protobuf::uint32 value) {
-  reserved4_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.reserved4)
-}
-inline void protobuf_sgx_report_body_t::add_reserved4(::google::protobuf::uint32 value) {
-  reserved4_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_body_t.reserved4)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_body_t::reserved4() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_body_t.reserved4)
-  return reserved4_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_body_t::mutable_reserved4() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_body_t.reserved4)
-  return &reserved4_;
-}
-
-// repeated uint32 report_data = 8 [packed = true];
-inline int protobuf_sgx_report_body_t::report_data_size() const {
-  return report_data_.size();
-}
-inline void protobuf_sgx_report_body_t::clear_report_data() {
-  report_data_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_body_t::report_data(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_body_t.report_data)
-  return report_data_.Get(index);
-}
-inline void protobuf_sgx_report_body_t::set_report_data(int index, ::google::protobuf::uint32 value) {
-  report_data_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_body_t.report_data)
-}
-inline void protobuf_sgx_report_body_t::add_report_data(::google::protobuf::uint32 value) {
-  report_data_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_body_t.report_data)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_body_t::report_data() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_body_t.report_data)
-  return report_data_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_body_t::mutable_report_data() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_body_t.report_data)
-  return &report_data_;
-}
-
-// -------------------------------------------------------------------
-
-// protobuf_sgx_report_t
-
-// required .protobuf_sgx_report_body_t body = 1;
-inline bool protobuf_sgx_report_t::has_body() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void protobuf_sgx_report_t::set_has_body() {
-  _has_bits_[0] |= 0x00000001u;
-}
-inline void protobuf_sgx_report_t::clear_has_body() {
-  _has_bits_[0] &= ~0x00000001u;
-}
-inline void protobuf_sgx_report_t::clear_body() {
-  if (body_ != NULL) body_->::protobuf_sgx_report_body_t::Clear();
-  clear_has_body();
-}
-inline const ::protobuf_sgx_report_body_t& protobuf_sgx_report_t::body() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_t.body)
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  return body_ != NULL ? *body_ : *default_instance().body_;
-#else
-  return body_ != NULL ? *body_ : *default_instance_->body_;
-#endif
-}
-inline ::protobuf_sgx_report_body_t* protobuf_sgx_report_t::mutable_body() {
-  set_has_body();
-  if (body_ == NULL) body_ = new ::protobuf_sgx_report_body_t;
-  // @@protoc_insertion_point(field_mutable:protobuf_sgx_report_t.body)
-  return body_;
-}
-inline ::protobuf_sgx_report_body_t* protobuf_sgx_report_t::release_body() {
-  clear_has_body();
-  ::protobuf_sgx_report_body_t* temp = body_;
-  body_ = NULL;
-  return temp;
-}
-inline void protobuf_sgx_report_t::set_allocated_body(::protobuf_sgx_report_body_t* body) {
-  delete body_;
-  body_ = body;
-  if (body) {
-    set_has_body();
-  } else {
-    clear_has_body();
-  }
-  // @@protoc_insertion_point(field_set_allocated:protobuf_sgx_report_t.body)
-}
-
-// repeated uint32 key_id = 2 [packed = true];
-inline int protobuf_sgx_report_t::key_id_size() const {
-  return key_id_.size();
-}
-inline void protobuf_sgx_report_t::clear_key_id() {
-  key_id_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_t::key_id(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_t.key_id)
-  return key_id_.Get(index);
-}
-inline void protobuf_sgx_report_t::set_key_id(int index, ::google::protobuf::uint32 value) {
-  key_id_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_t.key_id)
-}
-inline void protobuf_sgx_report_t::add_key_id(::google::protobuf::uint32 value) {
-  key_id_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_t.key_id)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_t::key_id() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_t.key_id)
-  return key_id_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_t::mutable_key_id() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_t.key_id)
-  return &key_id_;
-}
-
-// repeated uint32 mac = 3 [packed = true];
-inline int protobuf_sgx_report_t::mac_size() const {
-  return mac_.size();
-}
-inline void protobuf_sgx_report_t::clear_mac() {
-  mac_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_report_t::mac(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_report_t.mac)
-  return mac_.Get(index);
-}
-inline void protobuf_sgx_report_t::set_mac(int index, ::google::protobuf::uint32 value) {
-  mac_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_report_t.mac)
-}
-inline void protobuf_sgx_report_t::add_mac(::google::protobuf::uint32 value) {
-  mac_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_report_t.mac)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_report_t::mac() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_report_t.mac)
-  return mac_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_report_t::mutable_mac() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_report_t.mac)
-  return &mac_;
-}
-
-// -------------------------------------------------------------------
-
-// protobuf_sgx_target_info_t
-
-// repeated uint32 mr_enclave = 1 [packed = true];
-inline int protobuf_sgx_target_info_t::mr_enclave_size() const {
-  return mr_enclave_.size();
-}
-inline void protobuf_sgx_target_info_t::clear_mr_enclave() {
-  mr_enclave_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_target_info_t::mr_enclave(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_target_info_t.mr_enclave)
-  return mr_enclave_.Get(index);
-}
-inline void protobuf_sgx_target_info_t::set_mr_enclave(int index, ::google::protobuf::uint32 value) {
-  mr_enclave_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_target_info_t.mr_enclave)
-}
-inline void protobuf_sgx_target_info_t::add_mr_enclave(::google::protobuf::uint32 value) {
-  mr_enclave_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_target_info_t.mr_enclave)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_target_info_t::mr_enclave() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_target_info_t.mr_enclave)
-  return mr_enclave_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_target_info_t::mutable_mr_enclave() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_target_info_t.mr_enclave)
-  return &mr_enclave_;
-}
-
-// required .protobuf_sgx_attributes_t attributes = 4;
-inline bool protobuf_sgx_target_info_t::has_attributes() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void protobuf_sgx_target_info_t::set_has_attributes() {
-  _has_bits_[0] |= 0x00000002u;
-}
-inline void protobuf_sgx_target_info_t::clear_has_attributes() {
-  _has_bits_[0] &= ~0x00000002u;
-}
-inline void protobuf_sgx_target_info_t::clear_attributes() {
-  if (attributes_ != NULL) attributes_->::protobuf_sgx_attributes_t::Clear();
-  clear_has_attributes();
-}
-inline const ::protobuf_sgx_attributes_t& protobuf_sgx_target_info_t::attributes() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_target_info_t.attributes)
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  return attributes_ != NULL ? *attributes_ : *default_instance().attributes_;
-#else
-  return attributes_ != NULL ? *attributes_ : *default_instance_->attributes_;
-#endif
-}
-inline ::protobuf_sgx_attributes_t* protobuf_sgx_target_info_t::mutable_attributes() {
-  set_has_attributes();
-  if (attributes_ == NULL) attributes_ = new ::protobuf_sgx_attributes_t;
-  // @@protoc_insertion_point(field_mutable:protobuf_sgx_target_info_t.attributes)
-  return attributes_;
-}
-inline ::protobuf_sgx_attributes_t* protobuf_sgx_target_info_t::release_attributes() {
-  clear_has_attributes();
-  ::protobuf_sgx_attributes_t* temp = attributes_;
-  attributes_ = NULL;
-  return temp;
-}
-inline void protobuf_sgx_target_info_t::set_allocated_attributes(::protobuf_sgx_attributes_t* attributes) {
-  delete attributes_;
-  attributes_ = attributes;
-  if (attributes) {
-    set_has_attributes();
-  } else {
-    clear_has_attributes();
-  }
-  // @@protoc_insertion_point(field_set_allocated:protobuf_sgx_target_info_t.attributes)
-}
-
-// repeated uint32 reserved1 = 2 [packed = true];
-inline int protobuf_sgx_target_info_t::reserved1_size() const {
-  return reserved1_.size();
-}
-inline void protobuf_sgx_target_info_t::clear_reserved1() {
-  reserved1_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_target_info_t::reserved1(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_target_info_t.reserved1)
-  return reserved1_.Get(index);
-}
-inline void protobuf_sgx_target_info_t::set_reserved1(int index, ::google::protobuf::uint32 value) {
-  reserved1_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_target_info_t.reserved1)
-}
-inline void protobuf_sgx_target_info_t::add_reserved1(::google::protobuf::uint32 value) {
-  reserved1_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_target_info_t.reserved1)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_target_info_t::reserved1() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_target_info_t.reserved1)
-  return reserved1_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_target_info_t::mutable_reserved1() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_target_info_t.reserved1)
-  return &reserved1_;
-}
-
-// required uint32 misc_select = 5;
-inline bool protobuf_sgx_target_info_t::has_misc_select() const {
-  return (_has_bits_[0] & 0x00000008u) != 0;
-}
-inline void protobuf_sgx_target_info_t::set_has_misc_select() {
-  _has_bits_[0] |= 0x00000008u;
-}
-inline void protobuf_sgx_target_info_t::clear_has_misc_select() {
-  _has_bits_[0] &= ~0x00000008u;
-}
-inline void protobuf_sgx_target_info_t::clear_misc_select() {
-  misc_select_ = 0u;
-  clear_has_misc_select();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_target_info_t::misc_select() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_target_info_t.misc_select)
-  return misc_select_;
-}
-inline void protobuf_sgx_target_info_t::set_misc_select(::google::protobuf::uint32 value) {
-  set_has_misc_select();
-  misc_select_ = value;
-  // @@protoc_insertion_point(field_set:protobuf_sgx_target_info_t.misc_select)
-}
-
-// repeated uint32 reserved2 = 3 [packed = true];
-inline int protobuf_sgx_target_info_t::reserved2_size() const {
-  return reserved2_.size();
-}
-inline void protobuf_sgx_target_info_t::clear_reserved2() {
-  reserved2_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_target_info_t::reserved2(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_target_info_t.reserved2)
-  return reserved2_.Get(index);
-}
-inline void protobuf_sgx_target_info_t::set_reserved2(int index, ::google::protobuf::uint32 value) {
-  reserved2_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_target_info_t.reserved2)
-}
-inline void protobuf_sgx_target_info_t::add_reserved2(::google::protobuf::uint32 value) {
-  reserved2_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_target_info_t.reserved2)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_target_info_t::reserved2() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_target_info_t.reserved2)
-  return reserved2_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_target_info_t::mutable_reserved2() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_target_info_t.reserved2)
-  return &reserved2_;
-}
-
-// -------------------------------------------------------------------
-
-// protobuf_sgx_dh_msg1_t
-
-// required .protobuf_sgx_ec256_public_t g_a = 1;
-inline bool protobuf_sgx_dh_msg1_t::has_g_a() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void protobuf_sgx_dh_msg1_t::set_has_g_a() {
-  _has_bits_[0] |= 0x00000001u;
-}
-inline void protobuf_sgx_dh_msg1_t::clear_has_g_a() {
-  _has_bits_[0] &= ~0x00000001u;
-}
-inline void protobuf_sgx_dh_msg1_t::clear_g_a() {
-  if (g_a_ != NULL) g_a_->::protobuf_sgx_ec256_public_t::Clear();
-  clear_has_g_a();
-}
-inline const ::protobuf_sgx_ec256_public_t& protobuf_sgx_dh_msg1_t::g_a() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_dh_msg1_t.g_a)
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  return g_a_ != NULL ? *g_a_ : *default_instance().g_a_;
-#else
-  return g_a_ != NULL ? *g_a_ : *default_instance_->g_a_;
-#endif
-}
-inline ::protobuf_sgx_ec256_public_t* protobuf_sgx_dh_msg1_t::mutable_g_a() {
-  set_has_g_a();
-  if (g_a_ == NULL) g_a_ = new ::protobuf_sgx_ec256_public_t;
-  // @@protoc_insertion_point(field_mutable:protobuf_sgx_dh_msg1_t.g_a)
-  return g_a_;
-}
-inline ::protobuf_sgx_ec256_public_t* protobuf_sgx_dh_msg1_t::release_g_a() {
-  clear_has_g_a();
-  ::protobuf_sgx_ec256_public_t* temp = g_a_;
-  g_a_ = NULL;
-  return temp;
-}
-inline void protobuf_sgx_dh_msg1_t::set_allocated_g_a(::protobuf_sgx_ec256_public_t* g_a) {
-  delete g_a_;
-  g_a_ = g_a;
-  if (g_a) {
-    set_has_g_a();
-  } else {
-    clear_has_g_a();
-  }
-  // @@protoc_insertion_point(field_set_allocated:protobuf_sgx_dh_msg1_t.g_a)
-}
-
-// required .protobuf_sgx_target_info_t target = 2;
-inline bool protobuf_sgx_dh_msg1_t::has_target() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void protobuf_sgx_dh_msg1_t::set_has_target() {
-  _has_bits_[0] |= 0x00000002u;
-}
-inline void protobuf_sgx_dh_msg1_t::clear_has_target() {
-  _has_bits_[0] &= ~0x00000002u;
-}
-inline void protobuf_sgx_dh_msg1_t::clear_target() {
-  if (target_ != NULL) target_->::protobuf_sgx_target_info_t::Clear();
-  clear_has_target();
-}
-inline const ::protobuf_sgx_target_info_t& protobuf_sgx_dh_msg1_t::target() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_dh_msg1_t.target)
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  return target_ != NULL ? *target_ : *default_instance().target_;
-#else
-  return target_ != NULL ? *target_ : *default_instance_->target_;
-#endif
-}
-inline ::protobuf_sgx_target_info_t* protobuf_sgx_dh_msg1_t::mutable_target() {
-  set_has_target();
-  if (target_ == NULL) target_ = new ::protobuf_sgx_target_info_t;
-  // @@protoc_insertion_point(field_mutable:protobuf_sgx_dh_msg1_t.target)
-  return target_;
-}
-inline ::protobuf_sgx_target_info_t* protobuf_sgx_dh_msg1_t::release_target() {
-  clear_has_target();
-  ::protobuf_sgx_target_info_t* temp = target_;
-  target_ = NULL;
-  return temp;
-}
-inline void protobuf_sgx_dh_msg1_t::set_allocated_target(::protobuf_sgx_target_info_t* target) {
-  delete target_;
-  target_ = target;
-  if (target) {
-    set_has_target();
-  } else {
-    clear_has_target();
-  }
-  // @@protoc_insertion_point(field_set_allocated:protobuf_sgx_dh_msg1_t.target)
-}
-
-// -------------------------------------------------------------------
-
-// protobuf_sgx_dh_msg2_t
-
-// required .protobuf_sgx_ec256_public_t g_b = 1;
-inline bool protobuf_sgx_dh_msg2_t::has_g_b() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void protobuf_sgx_dh_msg2_t::set_has_g_b() {
-  _has_bits_[0] |= 0x00000001u;
-}
-inline void protobuf_sgx_dh_msg2_t::clear_has_g_b() {
-  _has_bits_[0] &= ~0x00000001u;
-}
-inline void protobuf_sgx_dh_msg2_t::clear_g_b() {
-  if (g_b_ != NULL) g_b_->::protobuf_sgx_ec256_public_t::Clear();
-  clear_has_g_b();
-}
-inline const ::protobuf_sgx_ec256_public_t& protobuf_sgx_dh_msg2_t::g_b() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_dh_msg2_t.g_b)
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  return g_b_ != NULL ? *g_b_ : *default_instance().g_b_;
-#else
-  return g_b_ != NULL ? *g_b_ : *default_instance_->g_b_;
-#endif
-}
-inline ::protobuf_sgx_ec256_public_t* protobuf_sgx_dh_msg2_t::mutable_g_b() {
-  set_has_g_b();
-  if (g_b_ == NULL) g_b_ = new ::protobuf_sgx_ec256_public_t;
-  // @@protoc_insertion_point(field_mutable:protobuf_sgx_dh_msg2_t.g_b)
-  return g_b_;
-}
-inline ::protobuf_sgx_ec256_public_t* protobuf_sgx_dh_msg2_t::release_g_b() {
-  clear_has_g_b();
-  ::protobuf_sgx_ec256_public_t* temp = g_b_;
-  g_b_ = NULL;
-  return temp;
-}
-inline void protobuf_sgx_dh_msg2_t::set_allocated_g_b(::protobuf_sgx_ec256_public_t* g_b) {
-  delete g_b_;
-  g_b_ = g_b;
-  if (g_b) {
-    set_has_g_b();
-  } else {
-    clear_has_g_b();
-  }
-  // @@protoc_insertion_point(field_set_allocated:protobuf_sgx_dh_msg2_t.g_b)
-}
-
-// required .protobuf_sgx_report_t report = 2;
-inline bool protobuf_sgx_dh_msg2_t::has_report() const {
-  return (_has_bits_[0] & 0x00000002u) != 0;
-}
-inline void protobuf_sgx_dh_msg2_t::set_has_report() {
-  _has_bits_[0] |= 0x00000002u;
-}
-inline void protobuf_sgx_dh_msg2_t::clear_has_report() {
-  _has_bits_[0] &= ~0x00000002u;
-}
-inline void protobuf_sgx_dh_msg2_t::clear_report() {
-  if (report_ != NULL) report_->::protobuf_sgx_report_t::Clear();
-  clear_has_report();
-}
-inline const ::protobuf_sgx_report_t& protobuf_sgx_dh_msg2_t::report() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_dh_msg2_t.report)
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  return report_ != NULL ? *report_ : *default_instance().report_;
-#else
-  return report_ != NULL ? *report_ : *default_instance_->report_;
-#endif
-}
-inline ::protobuf_sgx_report_t* protobuf_sgx_dh_msg2_t::mutable_report() {
-  set_has_report();
-  if (report_ == NULL) report_ = new ::protobuf_sgx_report_t;
-  // @@protoc_insertion_point(field_mutable:protobuf_sgx_dh_msg2_t.report)
-  return report_;
-}
-inline ::protobuf_sgx_report_t* protobuf_sgx_dh_msg2_t::release_report() {
-  clear_has_report();
-  ::protobuf_sgx_report_t* temp = report_;
-  report_ = NULL;
-  return temp;
-}
-inline void protobuf_sgx_dh_msg2_t::set_allocated_report(::protobuf_sgx_report_t* report) {
-  delete report_;
-  report_ = report;
-  if (report) {
-    set_has_report();
-  } else {
-    clear_has_report();
-  }
-  // @@protoc_insertion_point(field_set_allocated:protobuf_sgx_dh_msg2_t.report)
-}
-
-// repeated uint32 cmac = 3 [packed = true];
-inline int protobuf_sgx_dh_msg2_t::cmac_size() const {
-  return cmac_.size();
-}
-inline void protobuf_sgx_dh_msg2_t::clear_cmac() {
-  cmac_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_dh_msg2_t::cmac(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_dh_msg2_t.cmac)
-  return cmac_.Get(index);
-}
-inline void protobuf_sgx_dh_msg2_t::set_cmac(int index, ::google::protobuf::uint32 value) {
-  cmac_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_dh_msg2_t.cmac)
-}
-inline void protobuf_sgx_dh_msg2_t::add_cmac(::google::protobuf::uint32 value) {
-  cmac_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_dh_msg2_t.cmac)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_dh_msg2_t::cmac() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_dh_msg2_t.cmac)
-  return cmac_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_dh_msg2_t::mutable_cmac() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_dh_msg2_t.cmac)
-  return &cmac_;
-}
-
-// -------------------------------------------------------------------
-
-// protobuf_sgx_dh_msg3_body_t
-
-// required .protobuf_sgx_report_t report = 1;
-inline bool protobuf_sgx_dh_msg3_body_t::has_report() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void protobuf_sgx_dh_msg3_body_t::set_has_report() {
-  _has_bits_[0] |= 0x00000001u;
-}
-inline void protobuf_sgx_dh_msg3_body_t::clear_has_report() {
-  _has_bits_[0] &= ~0x00000001u;
-}
-inline void protobuf_sgx_dh_msg3_body_t::clear_report() {
-  if (report_ != NULL) report_->::protobuf_sgx_report_t::Clear();
-  clear_has_report();
-}
-inline const ::protobuf_sgx_report_t& protobuf_sgx_dh_msg3_body_t::report() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_dh_msg3_body_t.report)
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  return report_ != NULL ? *report_ : *default_instance().report_;
-#else
-  return report_ != NULL ? *report_ : *default_instance_->report_;
-#endif
-}
-inline ::protobuf_sgx_report_t* protobuf_sgx_dh_msg3_body_t::mutable_report() {
-  set_has_report();
-  if (report_ == NULL) report_ = new ::protobuf_sgx_report_t;
-  // @@protoc_insertion_point(field_mutable:protobuf_sgx_dh_msg3_body_t.report)
-  return report_;
-}
-inline ::protobuf_sgx_report_t* protobuf_sgx_dh_msg3_body_t::release_report() {
-  clear_has_report();
-  ::protobuf_sgx_report_t* temp = report_;
-  report_ = NULL;
-  return temp;
-}
-inline void protobuf_sgx_dh_msg3_body_t::set_allocated_report(::protobuf_sgx_report_t* report) {
-  delete report_;
-  report_ = report;
-  if (report) {
-    set_has_report();
-  } else {
-    clear_has_report();
-  }
-  // @@protoc_insertion_point(field_set_allocated:protobuf_sgx_dh_msg3_body_t.report)
-}
-
-// repeated uint32 additional_prop = 2;
-inline int protobuf_sgx_dh_msg3_body_t::additional_prop_size() const {
-  return additional_prop_.size();
-}
-inline void protobuf_sgx_dh_msg3_body_t::clear_additional_prop() {
-  additional_prop_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_dh_msg3_body_t::additional_prop(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_dh_msg3_body_t.additional_prop)
-  return additional_prop_.Get(index);
-}
-inline void protobuf_sgx_dh_msg3_body_t::set_additional_prop(int index, ::google::protobuf::uint32 value) {
-  additional_prop_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_dh_msg3_body_t.additional_prop)
-}
-inline void protobuf_sgx_dh_msg3_body_t::add_additional_prop(::google::protobuf::uint32 value) {
-  additional_prop_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_dh_msg3_body_t.additional_prop)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_dh_msg3_body_t::additional_prop() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_dh_msg3_body_t.additional_prop)
-  return additional_prop_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_dh_msg3_body_t::mutable_additional_prop() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_dh_msg3_body_t.additional_prop)
-  return &additional_prop_;
-}
-
-// -------------------------------------------------------------------
-
-// protobuf_sgx_dh_msg3_t
-
-// required .protobuf_sgx_dh_msg3_body_t msg3_body = 1;
-inline bool protobuf_sgx_dh_msg3_t::has_msg3_body() const {
-  return (_has_bits_[0] & 0x00000001u) != 0;
-}
-inline void protobuf_sgx_dh_msg3_t::set_has_msg3_body() {
-  _has_bits_[0] |= 0x00000001u;
-}
-inline void protobuf_sgx_dh_msg3_t::clear_has_msg3_body() {
-  _has_bits_[0] &= ~0x00000001u;
-}
-inline void protobuf_sgx_dh_msg3_t::clear_msg3_body() {
-  if (msg3_body_ != NULL) msg3_body_->::protobuf_sgx_dh_msg3_body_t::Clear();
-  clear_has_msg3_body();
-}
-inline const ::protobuf_sgx_dh_msg3_body_t& protobuf_sgx_dh_msg3_t::msg3_body() const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_dh_msg3_t.msg3_body)
-#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-  return msg3_body_ != NULL ? *msg3_body_ : *default_instance().msg3_body_;
-#else
-  return msg3_body_ != NULL ? *msg3_body_ : *default_instance_->msg3_body_;
-#endif
-}
-inline ::protobuf_sgx_dh_msg3_body_t* protobuf_sgx_dh_msg3_t::mutable_msg3_body() {
-  set_has_msg3_body();
-  if (msg3_body_ == NULL) msg3_body_ = new ::protobuf_sgx_dh_msg3_body_t;
-  // @@protoc_insertion_point(field_mutable:protobuf_sgx_dh_msg3_t.msg3_body)
-  return msg3_body_;
-}
-inline ::protobuf_sgx_dh_msg3_body_t* protobuf_sgx_dh_msg3_t::release_msg3_body() {
-  clear_has_msg3_body();
-  ::protobuf_sgx_dh_msg3_body_t* temp = msg3_body_;
-  msg3_body_ = NULL;
-  return temp;
-}
-inline void protobuf_sgx_dh_msg3_t::set_allocated_msg3_body(::protobuf_sgx_dh_msg3_body_t* msg3_body) {
-  delete msg3_body_;
-  msg3_body_ = msg3_body;
-  if (msg3_body) {
-    set_has_msg3_body();
-  } else {
-    clear_has_msg3_body();
-  }
-  // @@protoc_insertion_point(field_set_allocated:protobuf_sgx_dh_msg3_t.msg3_body)
-}
-
-// repeated uint32 cmac = 2 [packed = true];
-inline int protobuf_sgx_dh_msg3_t::cmac_size() const {
-  return cmac_.size();
-}
-inline void protobuf_sgx_dh_msg3_t::clear_cmac() {
-  cmac_.Clear();
-}
-inline ::google::protobuf::uint32 protobuf_sgx_dh_msg3_t::cmac(int index) const {
-  // @@protoc_insertion_point(field_get:protobuf_sgx_dh_msg3_t.cmac)
-  return cmac_.Get(index);
-}
-inline void protobuf_sgx_dh_msg3_t::set_cmac(int index, ::google::protobuf::uint32 value) {
-  cmac_.Set(index, value);
-  // @@protoc_insertion_point(field_set:protobuf_sgx_dh_msg3_t.cmac)
-}
-inline void protobuf_sgx_dh_msg3_t::add_cmac(::google::protobuf::uint32 value) {
-  cmac_.Add(value);
-  // @@protoc_insertion_point(field_add:protobuf_sgx_dh_msg3_t.cmac)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
-protobuf_sgx_dh_msg3_t::cmac() const {
-  // @@protoc_insertion_point(field_list:protobuf_sgx_dh_msg3_t.cmac)
-  return cmac_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
-protobuf_sgx_dh_msg3_t::mutable_cmac() {
-  // @@protoc_insertion_point(field_mutable_list:protobuf_sgx_dh_msg3_t.cmac)
-  return &cmac_;
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-// @@protoc_insertion_point(global_scope)
-
-#endif  // PROTOBUF_dhmsgs_2eproto__INCLUDED

+ 3 - 1
include/ProtobufMessageRW.h

@@ -4,13 +4,15 @@
 
 #ifndef VERIFIER_PROTOBUFMESSAGERW_H
 #define VERIFIER_PROTOBUFMESSAGERW_H
+//using namespace google::protobuf;
+#include <google/protobuf/message_lite.h>
 
 class ProtobufMessageRW {
     int fd;
 public:
     int read_msg(google::protobuf::MessageLite& message);
     int write_msg(google::protobuf::MessageLite& message);
-    uint32_t set_fd(fd);
+    void set_fd(int fd);
 };
 
 

+ 0 - 1
include/SgxLAInititator.h

@@ -1 +0,0 @@
-int create_session(int fd, uint8_t* mr_enclave, uint8_t* mr_signer, uint8_t* send_mr_signer);

+ 0 - 3
include/SgxProtobufLAInitiator.h

@@ -1,3 +0,0 @@
-uint32_t process_protobuf_dh_msg1_generate_protobuf_dh_msg2(protobuf_sgx_dh_msg1_t& protobuf_msg1, protobuf_sgx_dh_msg2_t& protobuf_msg2, uint32_t* session_id);
-uint32_t process_protobuf_dh_msg3(protobuf_sgx_dh_msg3_t& protobuf_msg3, uint32_t* session_id);
-uint32_t generate_encrypted_rsa_keypair_hash(uint8_t* hash, uint32_t* length);

+ 0 - 3
include/SgxProtobufLAInitiator_Transforms.h

@@ -1,3 +0,0 @@
-int decode_msg1_from_protobuf( protobuf_sgx_dh_msg1_t& protobuf_dhmsg1, sgx_dh_msg1_t* native_dhmsg1);
-int decode_msg3_from_protobuf(protobuf_sgx_dh_msg3_t& protobuf_dhmsg3, sgx_dh_msg3_t* native_dhmsg3);
-void encode_msg2_to_protobuf( protobuf_sgx_dh_msg2_t& protobuf_dhmsg2, sgx_dh_msg2_t* native_dhmsg2);

+ 1 - 1
include/Initiator_Transforms.h → include/Transforms.h

@@ -34,7 +34,7 @@ using namespace google::protobuf::io;
 #include <inttypes.h>
 
 
-class Initiator_Transforms {
+class Transforms {
     static int fit_32_into_uint8_t(google::protobuf::uint32 temp32, uint8_t* temp8);
     static int fit_32_into_uint16_t(google::protobuf::uint32 temp32, uint16_t* temp16);
     static void  encode_ec256_public_key_to_protobuf(protobuf_sgx_ec256_public_t* protobuf_g_a , sgx_ec256_public_t* g_a);

+ 8 - 12
include/crypto.h

@@ -1,12 +1,8 @@
-//uint32_t generate_rsa_key(std::string& priv_key_str, std::string& pub_key_str);
-//class RSA_signing_keypair 
-//{ 
-//	private:
-//        	RSA_ptr rsa; 
-//        	BN_ptr bn; 
-//	public: 
-//		RSA_signing_keypair(); 
-		uint32_t generate_rsa_keypair(FILE* fp, std::string& priv_key_str, std::string& pub_key_str); //, uint8_t* hash); 
-		uint32_t generate_rsa_keypair_hash(uint8_t* hash);
-//}
-int aes_cipher(int enc, unsigned char *key, unsigned char *iv, unsigned char* plaintext, int plaintext_len, unsigned char *ciphertext,  int* op_ciphertext_len, unsigned char* tag); 
+#ifndef CRYPTO_H
+#define CRYPTO_H
+
+uint32_t generate_rsa_keypair(FILE* fp, std::string& priv_key_str, std::string& pub_key_str); //, uint8_t* hash);
+uint32_t generate_rsa_keypair_hash(uint8_t* hash);
+int aes_gcm_128(int enc, unsigned char *key, unsigned char *iv, unsigned char* plaintext, int plaintext_len, unsigned char *ciphertext,  uint32_t* op_ciphertext_len, unsigned char* tag);
+
+#endif

+ 15 - 15
systemMain.cpp

@@ -1,18 +1,15 @@
+#include <stdint.h>
 #include <string.h>
 #include <string>
 #include <unistd.h>
-#include <errno.h>
-#include <jni.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>
-#include <signal.h>
-#include <Python.h>
 #include "crypto.h"
-#include "ProtobufLAInitiator.h"
 #include "SealerWrapper.h"
-//#include "crypto.h"
+
+#include "DeploymentStageLogic.h"
 using namespace std;
 
 #define DECRYPTOR_PORT 3824
@@ -113,8 +110,8 @@ int main(int argc, char** argv)
 
 */
 
-
-  uint8_t expected_apache_mr_signer[32] = {0};
+    /*
+  // uint8_t expected_apache_mr_signer[32] = {0};
   std::string apache_signature_keypair_private("1234567890");
   std::string apache_public_key;
   std::string apache_private_key2; 
@@ -161,22 +158,25 @@ int main(int argc, char** argv)
   }
   printf("\nSuccessfully sealed the plaintext %s to length 0x%x.\n", apache_signature_keypair_private.c_str(), expected_sealed_msg_size);
   fflush(stdout);
-
+    */
     uint8_t target_hash[32] = {0x54,0x24,0x5d,0x63,0x5c,0x8f,0xec,0xcf,0x37,0xb9,0xcf,0x9e,0xb8,0xd3,0x22,0x04,0x57,0x5b,0xb2,0xfc,0xa6,0xd3,0x11,0xfb,0x87,0xb7,0x01,0x06,0x2f,0x18,0x25,0xc1};
     DeploymentStageLogic deploymentStage;
 
     deploymentStage.set_target_hash(target_hash);
 
-    int ret_status = deploymentStage.set_up_socket_connect(DECRYPTOR_PORT);
-    if(ret_status != 0)
-        return ret_status;
+    int fd = deploymentStage.set_up_socket_connect(DECRYPTOR_PORT);
+    if(fd != 0)
+        // Set up an IPC channel for local attestation and post-LA messages.
+    {
+        printf("\nCould not set up the socket: had the following error: ");
+        fflush(stdout);
+        return fd;
+    }
 
-    ret_status = deploymentStage.main_logic();
+    int ret_status = deploymentStage.main_logic(fd);
     if(ret_status != 0)
         return ret_status;
 
-  printf("\nSuccessful LA with port %d.\n", DECRYPTOR_PORT);
-  fflush(stdout);
 /*
 //  sleep(50);
   printf("\n z z z z z z  z z z z z z z  (sleeping for a bit) z z z z z  z z z (meant to emulate the '2nd' stage of validator, that will be rerun whenever Apache changes)\n");