diff options
| author | sumuel <samuel@yakubos.org> | 2026-08-17 20:44:55 +0000 |
|---|---|---|
| committer | sumuel <samuel@yakubos.org> | 2026-08-17 20:44:55 +0000 |
| commit | 76424950e373d3b04ac3dd13019151bfba3e8423 (patch) | |
| tree | 4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /src/detection/tpm/tpm_apple.c | |
Add the files
Diffstat (limited to 'src/detection/tpm/tpm_apple.c')
| -rw-r--r-- | src/detection/tpm/tpm_apple.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/detection/tpm/tpm_apple.c b/src/detection/tpm/tpm_apple.c new file mode 100644 index 0000000..250dd01 --- /dev/null +++ b/src/detection/tpm/tpm_apple.c @@ -0,0 +1,30 @@ +#include "tpm.h" + +#ifndef __aarch64__ + #include "common/apple/cf_helpers.h" + #include <IOKit/IOKitLib.h> +#endif + +const char* ffDetectTPM(FFTPMResult* result) { +#ifdef __aarch64__ + + ffStrbufSetStatic(&result->version, "2.0"); + ffStrbufSetStatic(&result->description, "Apple Silicon Security"); + return NULL; + +#else + + FF_IOOBJECT_AUTO_RELEASE io_service_t t2Service = IOServiceGetMatchingService( + MACH_PORT_NULL, + IOServiceMatching("AppleT2")); + + if (t2Service) { + ffStrbufSetStatic(&result->version, "2.0"); + ffStrbufSetStatic(&result->description, "Apple T2 Security Chip"); + return NULL; + } + +#endif + + return "No Apple Security hardware detected"; +} |