]> git.saurik.com Git - apple/security.git/blob - OSX/utilities/src/SecInternalRelease.c
Security-57337.50.23.tar.gz
[apple/security.git] / OSX / utilities / src / SecInternalRelease.c
1 //
2 // utilities
3 //
4 // Copyright © 2015 Apple Inc. All rights reserved.
5 //
6
7 #include "SecInternalReleasePriv.h"
8
9
10 #include <dispatch/dispatch.h>
11 #include <AssertMacros.h>
12 #include <strings.h>
13
14 #if TARGET_OS_EMBEDDED
15 #include <MobileGestalt.h>
16 #else
17 #include <sys/utsname.h>
18 #endif
19
20
21 bool
22 SecIsInternalRelease(void)
23 {
24 static bool isInternal = false;
25
26 return isInternal;
27 }
28
29 bool SecIsProductionFused(void) {
30 static bool isProduction = true;
31 #if TARGET_OS_EMBEDDED
32 static dispatch_once_t once = 0;
33
34 dispatch_once(&once, ^{
35 CFBooleanRef productionFused = MGCopyAnswer(kMGQSigningFuse, NULL);
36 if (productionFused) {
37 if (CFEqual(productionFused, kCFBooleanFalse)) {
38 isProduction = false;
39 }
40 CFRelease(productionFused);
41 }
42 });
43 #endif
44 return isProduction;
45 }
46