]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_codesigning/lib/SecRequirementPriv.h
Security-58286.41.2.tar.gz
[apple/security.git] / OSX / libsecurity_codesigning / lib / SecRequirementPriv.h
index c7ad36839d27b7dbcc1643afe244fa8cad77f51e..d40b1bec7d899b8987bcff3a4ab9e06174ddd626 100644 (file)
@@ -30,6 +30,8 @@
 #define _H_SECREQUIREMENTPRIV
 
 #include <Security/SecRequirement.h>
+#include <Security/SecCertificatePriv.h>
+
 
 #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);