|
@@ -142,7 +142,7 @@ static sgx_status_t dh_generate_message1(sgx_dh_msg1_t *msg1, sgx_internal_dh_se
|
|
|
return SGX_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-static sgx_status_t dh_generate_message2(const sgx_dh_msg1_t *msg1,
|
|
|
+__attribute__((unused)) static sgx_status_t dh_generate_message2(const sgx_dh_msg1_t *msg1,
|
|
|
const sgx_ec256_public_t *g_b,
|
|
|
const sgx_key_128bit_t *dh_smk,
|
|
|
sgx_dh_msg2_t *msg2)
|
|
@@ -493,8 +493,8 @@ sgx_status_t sgx_dh_initiator_proc_msg1(const sgx_dh_msg1_t* msg1, sgx_dh_msg2_t
|
|
|
{
|
|
|
sgx_status_t se_ret;
|
|
|
|
|
|
- sgx_ec256_public_t pub_key;
|
|
|
- sgx_ec256_private_t priv_key;
|
|
|
+
|
|
|
+
|
|
|
sgx_ec256_dh_shared_t shared_key;
|
|
|
sgx_key_128bit_t dh_smk;
|
|
|
|
|
@@ -534,7 +534,8 @@ sgx_status_t sgx_dh_initiator_proc_msg1(const sgx_dh_msg1_t* msg1, sgx_dh_msg2_t
|
|
|
{
|
|
|
goto error;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
se_ret = sgx_ecc256_create_key_pair((sgx_ec256_private_t*)&priv_key,
|
|
|
(sgx_ec256_public_t*)&pub_key,
|
|
|
ecc_state);
|
|
@@ -588,7 +589,7 @@ sgx_status_t sgx_dh_initiator_proc_msg1(const sgx_dh_msg1_t* msg1, sgx_dh_msg2_t
|
|
|
}
|
|
|
|
|
|
session->initiator.state = SGX_DH_SESSION_INITIATOR_WAIT_M3;
|
|
|
- return SGX_SUCCESS;
|
|
|
+*/ return SGX_SUCCESS;
|
|
|
|
|
|
error:
|
|
|
sgx_ecc256_close_context(ecc_state);
|
|
@@ -604,6 +605,7 @@ error:
|
|
|
INTERNAL_SGX_ERROR_CODE_CONVERTOR(se_ret)
|
|
|
|
|
|
return se_ret;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|