Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Commit df73450

Browse files
committed
feat(rtc_data_enclave): add rtc_save_access_key_u OCALL definition and stub
1 parent 94466da commit df73450

File tree

8 files changed

+194
-78
lines changed

8 files changed

+194
-78
lines changed

codegen/data_enclave/bindings.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,44 @@ typedef struct UploadMetadata {
131131
uint8_t nonce[24];
132132
} UploadMetadata;
133133

134+
typedef uint8_t RecommendedAesGcmIv[12];
135+
136+
typedef struct SetAccessKeyEncryptedResponse {
137+
sgx_aes_gcm_128bit_tag_t tag;
138+
uint8_t ciphertext[SET_ACCESS_KEY_RESPONSE_SIZE];
139+
uint8_t aad[0];
140+
RecommendedAesGcmIv nonce;
141+
} SetAccessKeyEncryptedResponse;
142+
143+
/**
144+
* FFI safe result type that can be converted to and from a rust result.
145+
*/
146+
typedef enum EcallResult_SetAccessKeyEncryptedResponse__SealingError_Tag {
147+
ECALL_RESULT_SET_ACCESS_KEY_ENCRYPTED_RESPONSE_SEALING_ERROR_OK_SET_ACCESS_KEY_ENCRYPTED_RESPONSE_SEALING_ERROR,
148+
ECALL_RESULT_SET_ACCESS_KEY_ENCRYPTED_RESPONSE_SEALING_ERROR_ERR_SET_ACCESS_KEY_ENCRYPTED_RESPONSE_SEALING_ERROR,
149+
} EcallResult_SetAccessKeyEncryptedResponse__SealingError_Tag;
150+
151+
typedef struct EcallResult_SetAccessKeyEncryptedResponse__SealingError {
152+
EcallResult_SetAccessKeyEncryptedResponse__SealingError_Tag tag;
153+
union {
154+
struct {
155+
struct SetAccessKeyEncryptedResponse ok;
156+
};
157+
struct {
158+
struct SealingError err;
159+
};
160+
};
161+
} EcallResult_SetAccessKeyEncryptedResponse__SealingError;
162+
163+
typedef struct EcallResult_SetAccessKeyEncryptedResponse__SealingError SetAccessKeyResult;
164+
165+
typedef struct SetAccessKeyEncryptedRequest {
166+
sgx_aes_gcm_128bit_tag_t tag;
167+
uint8_t ciphertext[SET_ACCESS_KEY_REQUEST_SIZE];
168+
uint8_t aad[ARCHIVED_ENCLAVE_ID_SIZE];
169+
RecommendedAesGcmIv nonce;
170+
} SetAccessKeyEncryptedRequest;
171+
134172
/**
135173
* FFI safe result type that can be converted to and from a rust result.
136174
*/

0 commit comments

Comments
 (0)