1//
2// EntitlementsPriv.h
3// CoreEntitlements
4//
5
6
7#ifndef CORE_ENTITLEMENTS_ENTS_PRIV_H
8#define CORE_ENTITLEMENTS_ENTS_PRIV_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include <CoreEntitlements/Entitlements.h>
15#include <CoreEntitlements/der_vm.h>
16
17#ifndef CORE_ENTITLEMENTS_I_KNOW_WHAT_IM_DOING
18#error This is a private API, please consult with the Trusted Execution team before using this. Misusing these functions will lead to security issues.
19#endif
20
21__ptrcheck_abi_assume_single();
22
23struct CEQueryContext {
24 der_vm_context_t der_context;
25 bool managed;
26};
27
28
29CEError_t CEAcquireUnmanagedContext(const CERuntime_t rt, CEValidationResult validationResult, struct CEQueryContext* ctx);
30
31/*!
32 * @function CEConjureContextFromDER
33 * @brief Conjures up an object from thin air that you can query. Don't use it.
34 * @note It does no validation.
35 */
36struct CEQueryContext CEConjureContextFromDER(der_vm_context_t der_context);
37
38CEQueryOperation_t* CECreateStringOpInplace(CEQueryOperation_t* storage, CEQueryOpOpcode_t op, const char *__counted_by(len) data, size_t len);
39CEQueryOperation_t* CECreateNumericOpInplace(CEQueryOperation_t* storage, CEQueryOpOpcode_t op, int64_t param);
40
41#ifdef __cplusplus
42}
43#endif
44
45#endif
46