5 #ifndef __IMG4_ENVIRONMENT_H
6 #define __IMG4_ENVIRONMENT_H
8 #ifndef __IMG4_INDIRECT
9 #error "Please #include <img4/img4.h> instead of this file directly"
10 #endif // __IMG4_INDIRECT
17 * @typedef img4_environment_t
18 * An opaque type describing an Image4 environment.
20 typedef struct _img4_environment img4_environment_t
;
23 * @const IMG4_ENVIRONMENT_PLATFORM
24 * The environment for the host that uses the default platform implementation to
25 * resolve the environment. This is the environment against which manifests are
28 #if !XNU_KERNEL_PRIVATE
29 IMG4_API_AVAILABLE_20180112
31 const struct _img4_environment _img4_environment_platform
;
32 #define IMG4_ENVIRONMENT_PLATFORM (&_img4_environment_platform)
34 #define IMG4_ENVIRONMENT_PLATFORM (img4if->i4if_environment_platform)
39 * @const IMG4_ENVIRONMENT_TRUST_CACHE
40 * The software environment for globally-signed loadable trust caches. This
41 * environment should be used as a fallback when validation against the platform
42 * fails, and the caller is handling a loadable trust cache.
44 #if !XNU_KERNEL_PRIVATE
45 IMG4_API_AVAILABLE_20181004
47 const struct _img4_environment _img4_environment_trust_cache
;
48 #define IMG4_ENVIRONMENT_TRUST_CACHE (&_img4_environment_trust_cache)
50 #define IMG4_ENVIRONMENT_TRUST_CACHE (img4if->i4if_environment_trust_cache)
53 #endif // __IMG4_ENVIRONMENT_H