Open Enclave  0.17.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 typedef struct _oe_uuid_t
44 {
45  uint8_t b[OE_UUID_SIZE];
46 } oe_uuid_t;
47 
51 typedef struct _oe_claim
52 {
53  char* name;
54  uint8_t* value;
55  size_t value_size;
56 } oe_claim_t;
57 
58 /*
59  * Claims that are known to OE that every attestation plugin should output.
60  */
61 
65 #define OE_CLAIM_ID_VERSION "id_version"
66 
70 #define OE_CLAIM_SECURITY_VERSION "security_version"
71 
75 #define OE_CLAIM_ATTRIBUTES "attributes"
76 
80 #define OE_CLAIM_UNIQUE_ID "unique_id"
81 
85 #define OE_CLAIM_SIGNER_ID "signer_id"
86 
90 #define OE_CLAIM_PRODUCT_ID "product_id"
91 
95 #define OE_CLAIM_FORMAT_UUID "format_uuid"
96 
102 #define OE_REQUIRED_CLAIMS_COUNT 7
103 
104 // This array is needed for tests
105 extern const char* OE_REQUIRED_CLAIMS[OE_REQUIRED_CLAIMS_COUNT];
106 
112 /*
113  * Additional optional claims that are known to OE that plugins can output.
114  */
115 
120 #define OE_CLAIM_TCB_STATUS "tcb_status"
121 
126 #define OE_CLAIM_TCB_DATE "tcb_date"
127 
131 #define OE_CLAIM_VALIDITY_FROM "validity_from"
132 
136 #define OE_CLAIM_VALIDITY_UNTIL "validity_until"
137 
143 #define OE_OPTIONAL_CLAIMS_COUNT 4
144 // This array is needed for tests
145 extern const char* OE_OPTIONAL_CLAIMS[OE_OPTIONAL_CLAIMS_COUNT];
146 
155 #define OE_CLAIM_CUSTOM_CLAIMS_BUFFER "custom_claims_buffer"
156 
161 typedef enum _oe_policy_type
162 {
171 
175 typedef struct _oe_policy
176 {
177  oe_policy_type_t type;
178  void* policy;
179  size_t policy_size;
180 } oe_policy_t;
181 
182 OE_EXTERNC_END
183 
184 #endif /* _OE_BITS_EVIDENCE_H */
Generic struct for defining policy for the attestation plugins.
Definition: evidence.h:175
This file defines the types used by the OE SDK.
#define OE_UUID_SIZE
The size of a UUID in bytes.
Definition: evidence.h:38
struct _oe_policy oe_policy_t
Generic struct for defining policy for the attestation plugins.
Claims struct used for claims parameters for the attestation plugins.
Definition: evidence.h:51
enum _oe_policy_type oe_policy_type_t
Supported policies for validation by the verifier attestation plugin.
Struct containing the definition for an UUID.
Definition: evidence.h:43
Enforces that time fields in the endorsements will be checked with the given time rather than the end...
Definition: evidence.h:169
_oe_policy_type
Supported policies for validation by the verifier attestation plugin.
Definition: evidence.h:161
struct _oe_claim oe_claim_t
Claims struct used for claims parameters for the attestation plugins.
struct _oe_uuid_t oe_uuid_t
Struct containing the definition for an UUID.
This file defines structures and options passed to oe_get_report functions.