2 * Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
19 @header SecTrustedApplication
20 The functions provided in SecTrustedApplication implement an object representing an application in a
24 #ifndef _SECURITY_SECTRUSTEDAPPLICATION_H_
25 #define _SECURITY_SECTRUSTEDAPPLICATION_H_
27 #include <Security/SecBase.h>
28 #include <CoreFoundation/CoreFoundation.h>
31 #if defined(__cplusplus)
36 @function SecTrustedApplicationGetTypeID
37 @abstract Returns the type identifier of SecTrustedApplication instances.
38 @result The CFTypeID of SecTrustedApplication instances.
40 CFTypeID
SecTrustedApplicationGetTypeID(void);
43 @function SecTrustedApplicationCreateFromPath
44 @abstract Creates a trusted application reference based on the trusted application specified by path.
45 @param path The path to the application or tool to trust. For application bundles, use the
46 path to the bundle directory. Pass NULL to refer to yourself, i.e. the application or tool
48 @param app On return, a pointer to the trusted application reference.
49 @result A result code. See "Security Error Codes" (SecBase.h).
51 OSStatus
SecTrustedApplicationCreateFromPath(const char *path
, SecTrustedApplicationRef
*app
);
54 @function SecTrustedApplicationCopyData
55 @abstract Retrieves the data of a given trusted application reference
56 @param appRef A trusted application reference to retrieve data from
57 @param data On return, a pointer to a data reference of the trusted application.
58 @result A result code. See "Security Error Codes" (SecBase.h).
60 OSStatus
SecTrustedApplicationCopyData(SecTrustedApplicationRef appRef
, CFDataRef
*data
);
63 @function SecTrustedApplicationSetData
64 @abstract Sets the data of a given trusted application reference
65 @param appRef A trusted application reference.
66 @param data A reference to the data to set in the trusted application.
67 @result A result code. See "Security Error Codes" (SecBase.h).
69 OSStatus
SecTrustedApplicationSetData(SecTrustedApplicationRef appRef
, CFDataRef data
);
72 #if defined(__cplusplus)
76 #endif /* !_SECURITY_SECTRUSTEDAPPLICATION_H_ */