1 // 2 // KernelUtils.hpp 3 // CoreEntitlements_kernel 4 // 5 // 6 7 #ifndef CORE_ENTITLEMENTS_KERNEL_H 8 #define CORE_ENTITLEMENTS_KERNEL_H 9 10 #include <CoreEntitlements/CoreEntitlements.h> 11 #include <libkern/c++/OSPtr.h> 12 #include <libkern/c++/OSDictionary.h> 13 14 #ifndef CORE_ENTITLEMENTS_I_KNOW_WHAT_IM_DOING 15 #error This is a private API, please consult with the Trusted Execution team before using this. Misusing these functions will lead to security issues. 16 #endif 17 18 /*! 19 * @function CEQueryContextToOSDictionary 20 * Private API, converts a query context into an OSDictionary that can be handed out to legacy users 21 */ 22 OSPtr<OSDictionary> CEQueryContextToOSDictionary(CEQueryContext_t entitlements); 23 24 /*! 25 * @function CEQueryContextToOSObject 26 * Private API, converts a query context into an OSObject that may be returned dynamically 27 */ 28 OSPtr<OSObject> CEQueryContextToOSObject(CEQueryContext_t context); 29 30 #endif 31