]>
Commit | Line | Data |
---|---|---|
b1ab9ed8 A |
1 | /* |
2 | * Copyright (c) 2002-2004 Apple Computer, Inc. All Rights Reserved. | |
427c49bc | 3 | * |
b1ab9ed8 | 4 | * @APPLE_LICENSE_HEADER_START@ |
427c49bc | 5 | * |
b1ab9ed8 A |
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. | |
427c49bc | 12 | * |
b1ab9ed8 A |
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. | |
427c49bc | 20 | * |
b1ab9ed8 A |
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 | /*! | |
42 | @function SecTrustedApplicationGetTypeID | |
43 | @abstract Returns the type identifier of SecTrustedApplication instances. | |
44 | @result The CFTypeID of SecTrustedApplication instances. | |
45 | */ | |
46 | CFTypeID SecTrustedApplicationGetTypeID(void); | |
47 | ||
48 | /*! | |
49 | @function SecTrustedApplicationCreateFromPath | |
50 | @abstract Creates a trusted application reference based on the trusted application specified by path. | |
51 | @param path The path to the application or tool to trust. For application bundles, use the | |
52 | path to the bundle directory. Pass NULL to refer to yourself, i.e. the application or tool | |
53 | making this call. | |
54 | @param app On return, a pointer to the trusted application reference. | |
55 | @result A result code. See "Security Error Codes" (SecBase.h). | |
56 | */ | |
57 | OSStatus SecTrustedApplicationCreateFromPath(const char *path, SecTrustedApplicationRef *app); | |
58 | ||
59 | /*! | |
60 | @function SecTrustedApplicationCopyData | |
61 | @abstract Retrieves the data of a given trusted application reference | |
62 | @param appRef A trusted application reference to retrieve data from | |
63 | @param data On return, a pointer to a data reference of the trusted application. | |
64 | @result A result code. See "Security Error Codes" (SecBase.h). | |
65 | */ | |
66 | OSStatus SecTrustedApplicationCopyData(SecTrustedApplicationRef appRef, CFDataRef *data); | |
67 | ||
68 | /*! | |
69 | @function SecTrustedApplicationSetData | |
70 | @abstract Sets the data of a given trusted application reference | |
71 | @param appRef A trusted application reference. | |
72 | @param data A reference to the data to set in the trusted application. | |
73 | @result A result code. See "Security Error Codes" (SecBase.h). | |
74 | */ | |
75 | OSStatus SecTrustedApplicationSetData(SecTrustedApplicationRef appRef, CFDataRef data); | |
76 | ||
77 | ||
78 | #if defined(__cplusplus) | |
79 | } | |
80 | #endif | |
81 | ||
82 | #endif /* !_SECURITY_SECTRUSTEDAPPLICATION_H_ */ |