Open Enclave  0.8.0
report.h
Go to the documentation of this file.
1 // Copyright (c) Open Enclave SDK contributors.
2 // Licensed under the MIT License.
3 
10 #ifndef _OE_BITS_REPORT_H
11 #define _OE_BITS_REPORT_H
12 
13 #include "defs.h"
14 #include "types.h"
15 
16 OE_EXTERNC_BEGIN
17 
22 #define OE_REPORT_FLAGS_REMOTE_ATTESTATION 0x00000001
23 
27 #define OE_REPORT_DATA_SIZE 64
28 
32 #define OE_MAX_REPORT_SIZE (10 * 1024)
33 
37 // Fixed identity property sizes for OEv1
41 #define OE_UNIQUE_ID_SIZE 32
42 
45 #define OE_SIGNER_ID_SIZE 32
46 
49 #define OE_PRODUCT_ID_SIZE 16
50 
54 #define OE_REPORT_ATTRIBUTES_DEBUG 0x0000000000000001ULL
55 
58 #define OE_REPORT_ATTRIBUTES_REMOTE 0x0000000000000002ULL
59 
62 #define OE_REPORT_ATTRIBUTES_RESERVED \
63  (~(OE_REPORT_ATTRIBUTES_DEBUG | OE_REPORT_ATTRIBUTES_REMOTE))
64 
80 typedef struct _oe_identity
81 {
83  uint32_t id_version;
84 
87  uint32_t security_version;
88 
93  uint64_t attributes;
94 
97  uint8_t unique_id[OE_UNIQUE_ID_SIZE];
98 
101  uint8_t signer_id[OE_SIGNER_ID_SIZE];
102 
105  uint8_t product_id[OE_PRODUCT_ID_SIZE];
106 } oe_identity_t;
112 typedef struct _oe_report
113 {
115  size_t size;
116 
119 
122 
125 
128  uint8_t* report_data;
129 
132  uint8_t* enclave_report;
133 
136 } oe_report_t;
142 #define OE_UUID_SIZE 16
143 
147 typedef struct _oe_uuid_t
148 {
149  uint8_t b[OE_UUID_SIZE];
150 } oe_uuid_t;
151 
155 typedef struct _oe_claim
156 {
157  char* name;
158  uint8_t* value;
159  size_t value_size;
160 } oe_claim_t;
161 
165 #define OE_CLAIM_ID_VERSION "id_version"
166 #define OE_CLAIM_SECURITY_VERSION "security_version"
167 #define OE_CLAIM_ATTRIBUTES "attributes"
168 #define OE_CLAIM_UNIQUE_ID "unique_id"
169 #define OE_CLAIM_SIGNER_ID "signer_id"
170 #define OE_CLAIM_PRODUCT_ID "product_id"
171 #define OE_CLAIM_PLUGIN_UUID "plugin_uuid"
172 #define OE_REQUIRED_CLAIMS_COUNT 7
173 extern const char* OE_REQUIRED_CLAIMS[OE_REQUIRED_CLAIMS_COUNT];
174 
178 #define OE_CLAIM_VALIDITY_FROM "validity_from"
179 #define OE_CLAIM_VALIDITY_UNTIL "validity_until"
180 #define OE_OPTIONAL_CLAIMS_COUNT 2
181 extern const char* OE_OPTIONAL_CLAIMS[OE_OPTIONAL_CLAIMS_COUNT];
182 
187 typedef enum _oe_policy_type
188 {
197 
201 typedef struct _oe_policy
202 {
203  oe_policy_type_t type;
204  void* policy;
205  size_t policy_size;
206 } oe_policy_t;
207 
208 OE_EXTERNC_END
209 
210 #endif /* _OE_BITS_REPORT_H */
Generic struct for defining policy for the attestation plugins.
Definition: report.h:201
struct _oe_policy oe_policy_t
Generic struct for defining policy for the attestation plugins.
This file defines the types used by the OE SDK.
uint8_t * report_data
Pointer to report data field within the report byte-stream supplied to oe_parse_report.
Definition: report.h:128
Structure to hold the parsed form of a report.
Definition: report.h:112
enum _oe_enclave_type oe_enclave_type_t
This enumeration defines values for the type parameter passed to oe_create_enclave().
Structure to represent the identity of an enclave.
Definition: report.h:80
uint64_t attributes
Values of the attributes flags for the enclave - OE_REPORT_ATTRIBUTES_DEBUG: The report is for a debu...
Definition: report.h:93
#define OE_UUID_SIZE
The size of a UUID in bytes.
Definition: report.h:142
size_t size
Size of the oe_report_t structure.
Definition: report.h:115
Claims struct used for claims parameters for the attestation plugins.
Definition: report.h:155
Enforces that time fields in the endorsements will be checked in with the given time rather than the ...
Definition: report.h:195
uint32_t id_version
Version of the oe_identity_t structure.
Definition: report.h:83
oe_identity_t identity
Contains the IDs and attributes that are part of oe_identity_t.
Definition: report.h:135
size_t report_data_size
Size of report_data.
Definition: report.h:121
uint8_t unique_id[OE_UNIQUE_ID_SIZE]
The unique ID for the enclave.
Definition: report.h:97
Struct containing the definition for an UUID.
Definition: report.h:147
uint8_t product_id[OE_PRODUCT_ID_SIZE]
The Product ID for the enclave.
Definition: report.h:105
struct _oe_uuid_t oe_uuid_t
Struct containing the definition for an UUID.
uint8_t signer_id[OE_SIGNER_ID_SIZE]
The signer ID for the enclave.
Definition: report.h:101
struct _oe_report oe_report_t
Structure to hold the parsed form of a report.
_oe_policy_type
Supported policies for validation by the verifier attestation plugin.
Definition: report.h:187
oe_enclave_type_t type
The enclave type.
Definition: report.h:118
size_t enclave_report_size
Size of enclave_report.
Definition: report.h:124
uint8_t * enclave_report
Pointer to report body field within the report byte-stream supplied to oe_parse_report.
Definition: report.h:132
enum _oe_policy_type oe_policy_type_t
Supported policies for validation by the verifier attestation plugin.
struct _oe_identity oe_identity_t
Structure to represent the identity of an enclave.
uint32_t security_version
Security version of the enclave.
Definition: report.h:87
struct _oe_claim oe_claim_t
Claims struct used for claims parameters for the attestation plugins.