2 * Copyright (c) 2002-2004,2011-2012,2014 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
25 @header SecTrustedApplication
26 The functions provided in SecTrustedApplication implement an object representing an application in a
30 #ifndef _SECURITY_SECTRUSTEDAPPLICATION_H_
31 #define _SECURITY_SECTRUSTEDAPPLICATION_H_
33 #include <Security/SecBase.h>
34 #include <CoreFoundation/CoreFoundation.h>
37 #if defined(__cplusplus)
41 CF_ASSUME_NONNULL_BEGIN
44 @function SecTrustedApplicationGetTypeID
45 @abstract Returns the type identifier of SecTrustedApplication instances.
46 @result The CFTypeID of SecTrustedApplication instances.
48 CFTypeID
SecTrustedApplicationGetTypeID(void);
51 @function SecTrustedApplicationCreateFromPath
52 @abstract Creates a trusted application reference based on the trusted application specified by path.
53 @param path The path to the application or tool to trust. For application bundles, use the
54 path to the bundle directory. Pass NULL to refer to yourself, i.e. the application or tool
56 @param app On return, a pointer to the trusted application reference.
57 @result A result code. See "Security Error Codes" (SecBase.h).
59 OSStatus
SecTrustedApplicationCreateFromPath(const char * __nullable path
, SecTrustedApplicationRef
* __nonnull CF_RETURNS_RETAINED app
)
60 API_DEPRECATED("No longer supported", macos(10.0, 10.15))
61 API_UNAVAILABLE(ios
, watchos
, tvos
, bridgeos
, iosmac
);
64 @function SecTrustedApplicationCopyData
65 @abstract Retrieves the data of a given trusted application reference
66 @param appRef A trusted application reference to retrieve data from
67 @param data On return, a pointer to a data reference of the trusted application.
68 @result A result code. See "Security Error Codes" (SecBase.h).
70 OSStatus
SecTrustedApplicationCopyData(SecTrustedApplicationRef appRef
, CFDataRef
* __nonnull CF_RETURNS_RETAINED data
)
71 API_DEPRECATED("No longer supported", macos(10.0, 10.15))
72 API_UNAVAILABLE(ios
, watchos
, tvos
, bridgeos
, iosmac
);
75 @function SecTrustedApplicationSetData
76 @abstract Sets the data of a given trusted application reference
77 @param appRef A trusted application reference.
78 @param data A reference to the data to set in the trusted application.
79 @result A result code. See "Security Error Codes" (SecBase.h).
81 OSStatus
SecTrustedApplicationSetData(SecTrustedApplicationRef appRef
, CFDataRef data
)
82 API_DEPRECATED("No longer supported", macos(10.0, 10.15))
83 API_UNAVAILABLE(ios
, watchos
, tvos
, bridgeos
, iosmac
);
87 #if defined(__cplusplus)
91 #endif /* !_SECURITY_SECTRUSTEDAPPLICATION_H_ */