12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #include "provision_msg.h"
- #include <sgx_trts.h>
- #include "protocol.h"
- #include "helper.h"
- #include "cipher.h"
- #include <string.h>
- static pve_status_t gen_es_selector_id(uint8_t *selector_id)
- {
- ppid_t ppid;
- memset(&ppid, 0, sizeof(ppid));
- pve_status_t ret = get_ppid(&ppid);
- if(ret != PVEC_SUCCESS)
- return ret;
- *selector_id = ppid.ppid[0];
- (void)memset_s(&ppid, sizeof(ppid), 0, sizeof(ppid));
- return PVEC_SUCCESS;
- }
- pve_status_t gen_es_msg1_data(gen_endpoint_selection_output_t *es_selector)
- {
-
- pve_status_t ret = se_read_rand_error_to_pve_error(sgx_read_rand(es_selector->xid, XID_SIZE));
- if(ret != PVEC_SUCCESS)
- return ret;
-
- return gen_es_selector_id(&es_selector->selector_id);
- }
|