X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/fa7225c82381bac4432a6edf16f53b5370238d85..0d4552ce43ff8bf2e8666a9c5c44c3590eb117a8:/sectask/SecTask.h?ds=sidebyside diff --git a/sectask/SecTask.h b/sectask/SecTask.h index 22200f3a..c1bf28a0 100644 --- a/sectask/SecTask.h +++ b/sectask/SecTask.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008,2012-2013 Apple Inc. All Rights Reserved. + * Copyright (c) 2008,2012-2016 Apple Inc. All Rights Reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,12 +24,22 @@ #ifndef _SECURITY_SECTASK_H_ #define _SECURITY_SECTASK_H_ +#include + #include #include + #include +#if SEC_OS_OSX +#include +#endif /* SEC_OS_OSX */ + __BEGIN_DECLS +CF_ASSUME_NONNULL_BEGIN +CF_IMPLICIT_BRIDGING_ENABLED + /*! @typedef SecTaskRef @abstract CFType used for representing a task @@ -51,15 +61,18 @@ CFTypeID SecTaskGetTypeID(void); @result The newly created SecTask object or NULL on error. The caller must CFRelease the returned object. */ -SecTaskRef SecTaskCreateWithAuditToken(CFAllocatorRef allocator, audit_token_t token); +__nullable +SecTaskRef SecTaskCreateWithAuditToken(CFAllocatorRef __nullable allocator, audit_token_t token); /*! - @function SecTaskCreateFromSelf - @abstract Create a SecTask object for the current task. - @result The newly created SecTask object or NULL on error. The caller must - CFRelease the returned object. - */ -SecTaskRef SecTaskCreateFromSelf(CFAllocatorRef allocator); + @function SecTaskCreateFromSelf + @abstract Create a SecTask object for the current task. + @result The newly created SecTask object or NULL on error. The caller must + CFRelease the returned object. +#ifndef LEFT +*/ +__nullable +SecTaskRef SecTaskCreateFromSelf(CFAllocatorRef __nullable allocator); /*! @function SecTaskCopyValueForEntitlement @@ -78,6 +91,7 @@ SecTaskRef SecTaskCreateFromSelf(CFAllocatorRef allocator); the entitlement is simply not present. In the latter case, no CFError is returned. */ +__nullable CFTypeRef SecTaskCopyValueForEntitlement(SecTaskRef task, CFStringRef entitlement, CFErrorRef *error); /*! @@ -92,6 +106,7 @@ CFTypeRef SecTaskCopyValueForEntitlement(SecTaskRef task, CFStringRef entitlemen returned dictionary, the entitlement is not set on the task. The caller must CFRelease the returned value */ +__nullable CFDictionaryRef SecTaskCopyValuesForEntitlements(SecTaskRef task, CFArrayRef entitlements, CFErrorRef *error); /*! @@ -102,6 +117,7 @@ CFDictionaryRef SecTaskCopyValuesForEntitlements(SecTaskRef task, CFArrayRef ent the problem. This argument may be NULL if the caller is not interested in detailed errors. The caller must CFRelease the returned value */ +__nullable CFStringRef SecTaskCopySigningIdentifier(SecTaskRef task, CFErrorRef *error); /*! @@ -110,7 +126,12 @@ CFStringRef SecTaskCopySigningIdentifier(SecTaskRef task, CFErrorRef *error); @param task A previously created SecTask object */ -uint32_t SecTaskGetCodeSignStatus(SecTaskRef task); +uint32_t SecTaskGetCodeSignStatus(SecTaskRef task) + API_AVAILABLE(ios(10.0), watchos(3.0), tvos(10.0), iosmac(11.0)) SPI_AVAILABLE(macos(10.5)); + + +CF_IMPLICIT_BRIDGING_DISABLED +CF_ASSUME_NONNULL_END __END_DECLS