X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/5c19dc3ae3bd8e40a9c028b0deddd50ff337692c..3f0f0d49a9b6c2c6d459239f5926d59314cdeacf:/OSX/libsecurity_codesigning/lib/SecRequirementPriv.h diff --git a/OSX/libsecurity_codesigning/lib/SecRequirementPriv.h b/OSX/libsecurity_codesigning/lib/SecRequirementPriv.h index c7ad3683..d40b1bec 100644 --- a/OSX/libsecurity_codesigning/lib/SecRequirementPriv.h +++ b/OSX/libsecurity_codesigning/lib/SecRequirementPriv.h @@ -30,6 +30,8 @@ #define _H_SECREQUIREMENTPRIV #include +#include + #ifdef __cplusplus extern "C" { @@ -68,7 +70,13 @@ OSStatus SecRequirementsCreateFromRequirements(CFDictionaryRef requirements, Sec OSStatus SecRequirementsCopyRequirements(CFDataRef requirementSet, SecCSFlags flags, CFDictionaryRef *requirements); - + + +typedef CF_OPTIONS(uint32_t, SecCSFlagsPriv) { + kSecCSParseRequirement = 0x0001, // accept single requirements + kSecCSParseRequirementSet = 0x0002, // accept requirement sets +}; + /*! @function SecRequirementsCreateWithString Create a SecRequirement object or requirement set based on the string provided. @@ -87,11 +95,6 @@ OSStatus SecRequirementsCopyRequirements(CFDataRef requirementSet, SecCSFlags fl @result Upon success, errSecSuccess. Upon error, an OSStatus value documented in CSCommon.h or certain other Security framework headers. */ -enum { - kSecCSParseRequirement = 0x0001, // accept single requirements - kSecCSParseRequirementSet = 0x0002, // accept requirement sets -}; - OSStatus SecRequirementsCreateWithString(CFStringRef text, SecCSFlags flags, CFTypeRef *result, CFErrorRef *errors); @@ -110,7 +113,7 @@ OSStatus SecRequirementsCreateWithString(CFStringRef text, SecCSFlags flags, recompiling the text using SecRequirementCreateWithString will produce a SecRequirement object that behaves identically to the one you start with. - @param requirements A SecRequirementRef, or a CFDataRef containing a valid requirement set. + @param input A SecRequirementRef, or a CFDataRef containing a valid requirement set. @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior. @param text On successful return, contains a reference to a CFString object containing a text representation of the requirement. @@ -158,7 +161,9 @@ OSStatus SecRequirementCreateGroup(CFStringRef groupName, SecCertificateRef anch SecCSFlags flags, SecRequirementRef *requirement); - +extern CFStringRef kSecRequirementKeyInfoPlist; +extern CFStringRef kSecRequirementKeyEntitlements; +extern CFStringRef kSecRequirementKeyIdentifier; /*! @function SecRequirementEvaluate Explicitly evaluate a SecRequirementRef against context provided in the call. @@ -181,10 +186,6 @@ OSStatus SecRequirementCreateGroup(CFStringRef groupName, SecCertificateRef anch an entitlement dictionary. If this key is missing, all references to entitlements will fail. @constant kSecRequirementKeyIdentifier A context key providing the signing identifier as a CFString. */ -extern CFStringRef kSecRequirementKeyInfoPlist; -extern CFStringRef kSecRequirementKeyEntitlements; -extern CFStringRef kSecRequirementKeyIdentifier; - OSStatus SecRequirementEvaluate(SecRequirementRef requirement, CFArrayRef certificateChain, CFDictionaryRef context, SecCSFlags flags);