|
@@ -84,6 +84,11 @@ bool config_parse(Config &config, const std::string configstr,
|
|
|
config.m_pub_out = pentry.second.get_value<uint8_t>();
|
|
|
} else if (!pentry.first.compare("pub_in")) {
|
|
|
config.m_pub_in = pentry.second.get_value<uint8_t>();
|
|
|
+ // Currently hardcoding an AES key for client -> server communication
|
|
|
+ } else if (!pentry.first.compare("client_aes_key")) {
|
|
|
+ std::string hex_key = pentry.second.data();
|
|
|
+ memcpy(config.client_aes_key, hex_key.c_str(), SGX_AESGCM_KEY_SIZE);
|
|
|
+
|
|
|
} else {
|
|
|
std::cerr << "Unknown field in params: " <<
|
|
|
pentry.first << "\n";
|
|
@@ -151,6 +156,7 @@ bool config_parse(Config &config, const std::string configstr,
|
|
|
apiparams.m_priv_in = config.m_priv_in;
|
|
|
apiparams.m_pub_out = config.m_pub_out;
|
|
|
apiparams.m_pub_in = config.m_pub_in;
|
|
|
+ memcpy(apiparams.client_aes_key, config.client_aes_key, SGX_AESGCM_KEY_SIZE);
|
|
|
nodenum_t num_nodes = (nodenum_t)(config.nodes.size());
|
|
|
std::vector<EnclaveAPINodeConfig> apinodeconfigs;
|
|
|
apinodeconfigs.resize(num_nodes);
|