X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/5dd5f9ec28f304ca377c42fd7f711d6cf12b90e1..5c19dc3ae3bd8e40a9c028b0deddd50ff337692c:/OSX/utilities/src/SecInternalRelease.c diff --git a/OSX/utilities/src/SecInternalRelease.c b/OSX/utilities/src/SecInternalRelease.c new file mode 100644 index 00000000..b151fc41 --- /dev/null +++ b/OSX/utilities/src/SecInternalRelease.c @@ -0,0 +1,46 @@ +// +// utilities +// +// Copyright © 2015 Apple Inc. All rights reserved. +// + +#include "SecInternalReleasePriv.h" + + +#include +#include +#include + +#if TARGET_OS_EMBEDDED +#include +#else +#include +#endif + + +bool +SecIsInternalRelease(void) +{ + static bool isInternal = false; + + return isInternal; +} + +bool SecIsProductionFused(void) { + static bool isProduction = true; +#if TARGET_OS_EMBEDDED + static dispatch_once_t once = 0; + + dispatch_once(&once, ^{ + CFBooleanRef productionFused = MGCopyAnswer(kMGQSigningFuse, NULL); + if (productionFused) { + if (CFEqual(productionFused, kCFBooleanFalse)) { + isProduction = false; + } + CFRelease(productionFused); + } + }); +#endif + return isProduction; +} +