]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_keychain/lib/SecTrustedApplication.h
Security-59754.41.1.tar.gz
[apple/security.git] / OSX / libsecurity_keychain / lib / SecTrustedApplication.h
1 /*
2 * Copyright (c) 2002-2004,2011-2012,2014 Apple Inc. All Rights Reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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
11 * file.
12 *
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.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 /*!
25 @header SecTrustedApplication
26 The functions provided in SecTrustedApplication implement an object representing an application in a
27 SecAccess object.
28 */
29
30 #ifndef _SECURITY_SECTRUSTEDAPPLICATION_H_
31 #define _SECURITY_SECTRUSTEDAPPLICATION_H_
32
33 #include <Security/SecBase.h>
34 #include <CoreFoundation/CoreFoundation.h>
35
36
37 #if defined(__cplusplus)
38 extern "C" {
39 #endif
40
41 CF_ASSUME_NONNULL_BEGIN
42
43 /*!
44 @function SecTrustedApplicationGetTypeID
45 @abstract Returns the type identifier of SecTrustedApplication instances.
46 @result The CFTypeID of SecTrustedApplication instances.
47 */
48 CFTypeID SecTrustedApplicationGetTypeID(void);
49
50 /*!
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
55 making this call.
56 @param app On return, a pointer to the trusted application reference.
57 @result A result code. See "Security Error Codes" (SecBase.h).
58 */
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, macCatalyst);
62
63 /*!
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).
69 */
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, macCatalyst);
73
74 /*!
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).
80 */
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, macCatalyst);
84
85 CF_ASSUME_NONNULL_END
86
87 #if defined(__cplusplus)
88 }
89 #endif
90
91 #endif /* !_SECURITY_SECTRUSTEDAPPLICATION_H_ */