Open Enclave  0.18.0
evidence.h
Go to the documentation of this file.
1 // Copyright (c) Open Enclave SDK contributors.
2 // Licensed under the MIT License.
3 
12 #ifndef _OE_BITS_EVIDENCE_H
13 #define _OE_BITS_EVIDENCE_H
14 
15 #include "defs.h"
16 #include "report.h"
17 #include "types.h"
18 
19 OE_EXTERNC_BEGIN
20 
24 #define OE_EVIDENCE_ATTRIBUTES_SGX_DEBUG OE_REPORT_ATTRIBUTES_DEBUG
25 
28 #define OE_EVIDENCE_ATTRIBUTES_SGX_REMOTE OE_REPORT_ATTRIBUTES_REMOTE
29 
32 #define OE_EVIDENCE_ATTRIBUTES_RESERVED \
33  (~(OE_EVIDENCE_ATTRIBUTES_SGX_DEBUG | OE_EVIDENCE_ATTRIBUTES_SGX_REMOTE))
34 
38 #define OE_UUID_SIZE 16
39 
43 #define OE_UEID_SIZE 33
44 
48 #define OE_UEID_TYPE_RAND 0x01
49 #define OE_UEID_TYPE_IEEE_EUI 0x02
50 #define OE_UEID_TYPE_IMEI 0x03
51 
55 typedef struct _oe_uuid_t
56 {
57  uint8_t b[OE_UUID_SIZE];
58 } oe_uuid_t;
59 
63 typedef struct _oe_claim
64 {
65  char* name;
66  uint8_t* value;
67  size_t value_size;
68 } oe_claim_t;
69 
70 /*
71  * Claims that are known to OE that every attestation plugin should output.
72  */
73 
77 #define OE_CLAIM_ID_VERSION "id_version"
78 
82 #define OE_CLAIM_SECURITY_VERSION "security_version"
83 
87 #define OE_CLAIM_ATTRIBUTES "attributes"
88 
92 #define OE_CLAIM_UNIQUE_ID "unique_id"
93 
97 #define OE_CLAIM_SIGNER_ID "signer_id"
98 
102 #define OE_CLAIM_PRODUCT_ID "product_id"
103 
107 #define OE_CLAIM_FORMAT_UUID "format_uuid"
108 
114 #define OE_REQUIRED_CLAIMS_COUNT 7
115 
116 // This array is needed for tests
117 extern const char* OE_REQUIRED_CLAIMS[OE_REQUIRED_CLAIMS_COUNT];
118 
124 /*
125  * Additional optional claims that are known to OE that plugins can output.
126  */
127 
132 #define OE_CLAIM_TCB_STATUS "tcb_status"
133 
138 #define OE_CLAIM_TCB_DATE "tcb_date"
139 
143 #define OE_CLAIM_VALIDITY_FROM "validity_from"
144 
148 #define OE_CLAIM_VALIDITY_UNTIL "validity_until"
149 
153 #define OE_CLAIM_UEID "ueid"
154 
158 #define OE_CLAIM_HARDWARE_MODEL "hardware_model"
159 
165 #define OE_OPTIONAL_CLAIMS_COUNT 6
166 // This array is needed for tests
167 extern const char* OE_OPTIONAL_CLAIMS[OE_OPTIONAL_CLAIMS_COUNT];
168 
177 #define OE_CLAIM_CUSTOM_CLAIMS_BUFFER "custom_claims_buffer"
178 
183 typedef enum _oe_policy_type
184 {
192 
202 
206 typedef struct _oe_policy
207 {
208  oe_policy_type_t type;
209  void* policy;
210  size_t policy_size;
211 } oe_policy_t;
212 
213 OE_EXTERNC_END
214 
215 #endif /* _OE_BITS_EVIDENCE_H */
types.h
OE_UUID_SIZE
#define OE_UUID_SIZE
The size of a UUID in bytes.
Definition: evidence.h:38
_oe_policy
Generic struct for defining policy for the attestation plugins.
Definition: evidence.h:206
_oe_uuid_t
Struct containing the definition for an UUID.
Definition: evidence.h:55
OE_POLICY_ENDORSEMENTS_BASELINE
@ OE_POLICY_ENDORSEMENTS_BASELINE
Enforces a baseline of endorsements that is defined and used by third party endorsements info caching...
Definition: evidence.h:200
_oe_policy_type
_oe_policy_type
Supported policies for validation by the verifier attestation plugin.
Definition: evidence.h:183
oe_claim_t
struct _oe_claim oe_claim_t
Claims struct used for claims parameters for the attestation plugins.
report.h
_oe_claim
Claims struct used for claims parameters for the attestation plugins.
Definition: evidence.h:63
OE_POLICY_ENDORSEMENTS_TIME
@ OE_POLICY_ENDORSEMENTS_TIME
Enforces that time fields in the endorsements will be checked with the given time rather than the end...
Definition: evidence.h:191
oe_policy_type_t
enum _oe_policy_type oe_policy_type_t
Supported policies for validation by the verifier attestation plugin.
oe_policy_t
struct _oe_policy oe_policy_t
Generic struct for defining policy for the attestation plugins.
oe_uuid_t
struct _oe_uuid_t oe_uuid_t
Struct containing the definition for an UUID.