]>
Commit | Line | Data |
---|---|---|
f380ce78 | 1 | /* |
b1ab9ed8 | 2 | * Copyright (c) 2006 Apple Computer, Inc. All Rights Reserved. |
f380ce78 A |
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 | */ | |
b1ab9ed8 A |
23 | |
24 | /*! | |
25 | @header SecStaticCode | |
26 | SecStaticCodePriv is the private counter-part to SecStaticCode. Its contents are not | |
27 | official API, and are subject to change without notice. | |
28 | */ | |
29 | #ifndef _H_SECSTATICCODEPRIV | |
30 | #define _H_SECSTATICCODEPRIV | |
31 | ||
32 | #include <Security/SecStaticCode.h> | |
33 | ||
34 | #ifdef __cplusplus | |
35 | extern "C" { | |
36 | #endif | |
37 | ||
38 | ||
39 | /* | |
427c49bc A |
40 | @function SecCodeSetCallback |
41 | For a given Code or StaticCode object, specify a block that is invoked at certain | |
42 | stages of a validation operation. The block is only invoked for validations of this | |
43 | particular object. Note that validation outcomes are cached in the API object, and | |
44 | repeated validations will not generally result in the same set of callbacks. | |
45 | Only one callback can be active for each API object. A new call to SecCodeSetCallback | |
46 | replaces the previous callback. | |
47 | ||
48 | @param code A Code or StaticCode object whose validation should be monitored. | |
49 | @param flags Optional flags. Pass kSecCSDefaultFlags for standard behavior. | |
50 | @param old A pointer to a block pointer that receives any previously registered callback. | |
51 | Pass NULL if you are not interested in any previous value. | |
52 | @param callback A block to be synchronously invoked at certain stages of API operation. | |
53 | Pass NULL to disable callbacks for this code object. The block must be available to | |
54 | be invoked, possibly repeatedly, for as long as the code object exists or it is superseded | |
55 | by another call to this API, whichever happens earlier. | |
56 | From your block, return NULL to continue normal operation. Return a CFTypeRef object of | |
57 | suitable value for the reported stage to intervene. | |
b1ab9ed8 | 58 | */ |
427c49bc | 59 | OSStatus SecStaticCodeSetCallback(SecStaticCodeRef code, SecCSFlags flag, SecCodeCallback *olds, SecCodeCallback callback); |
b1ab9ed8 | 60 | |
80e23899 A |
61 | |
62 | /* | |
63 | @function SecStaticCodeSetValidationConditions | |
64 | Set various parameters that modify the evaluation of a signature. | |
65 | This is an internal affordance used by Gatekeeper to implement checkfix evaluation. | |
66 | It is not meant to be a generally useful mechanism. | |
67 | ||
68 | @param code A Code or StaticCode object whose validation should be modified. | |
69 | @param conditions A dictionary containing one or more validation conditions. Must not be NULL. | |
70 | */ | |
71 | OSStatus SecStaticCodeSetValidationConditions(SecStaticCodeRef code, CFDictionaryRef conditions); | |
72 | ||
b1ab9ed8 A |
73 | |
74 | #ifdef __cplusplus | |
75 | } | |
76 | #endif | |
77 | ||
78 | #endif //_H_SECSTATICCODEPRIV |