xref: /xnu-8020.140.41/EXTERNAL_HEADERS/CoreEntitlements/EntitlementsPriv.h (revision 27b03b360a988dfd3dfdf34262bb0042026747cc)
1 //
2 //  EntitlementsPriv.h
3 //  CoreEntitlements
4 //
5 
6 
7 #pragma once
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #include "Entitlements.h"
14 #include "der_vm.h"
15 
16 #ifndef CORE_ENTITLEMENTS_I_KNOW_WHAT_IM_DOING
17 #error This is a private API, please consult with the Trusted Execution team before using this. Misusing these functions will lead to security issues.
18 #endif
19 
20 struct CEQueryContext {
21     der_vm_context_t der_context;
22     bool managed;
23 };
24 
25 
26 CEError_t CEAcquireUnmanagedContext(const CERuntime_t rt, CEValidationResult validationResult, struct CEQueryContext* ctx);
27 
28 /*!
29  * @function CEConjureContextFromDER
30  * @brief Conjures up an object from thin air that you can query. Don't use it.
31  * @note It does no validation.
32  */
33 struct CEQueryContext CEConjureContextFromDER(der_vm_context_t der_context);
34 
35 #ifdef __cplusplus
36 }
37 #endif
38