]> git.saurik.com Git - apple/security.git/blob - OSX/sec/Security/cssmapple.h
Security-57740.20.22.tar.gz
[apple/security.git] / OSX / sec / Security / cssmapple.h
1 /*
2 * Copyright (c) 2000-2004,2013-2015 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 * cssmapple.h -- CSSM features specific to Apple's Implementation
24 */
25
26 #ifndef _CSSMAPPLE_H_
27 #define _CSSMAPPLE_H_ 1
28
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #pragma clang diagnostic push
35 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
36
37 /* First, an array of bits indicating various status of the cert. */
38 typedef uint32 CSSM_TP_APPLE_CERT_STATUS;
39 enum
40 {
41 CSSM_CERT_STATUS_EXPIRED = 0x00000001,
42 CSSM_CERT_STATUS_NOT_VALID_YET = 0x00000002,
43 CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 0x00000004,
44 CSSM_CERT_STATUS_IS_IN_ANCHORS = 0x00000008,
45 CSSM_CERT_STATUS_IS_ROOT = 0x00000010,
46 CSSM_CERT_STATUS_IS_FROM_NET = 0x00000020,
47 /* settings found in per-user Trust Settings */
48 CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 0x00000040,
49 /* settings found in Admin Trust Settings */
50 CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 0x00000080,
51 /* settings found in System Trust Settings */
52 CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 0x00000100,
53 /* Trust Settings result = Trust */
54 CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 0x00000200,
55 /* Trust Settings result = Deny */
56 CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 0x00000400,
57 /* Per-cert error ignored due to Trust Settings */
58 CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 0x00000800
59 };
60
61 typedef struct {
62 CSSM_TP_APPLE_CERT_STATUS StatusBits;
63 uint32 NumStatusCodes;
64 CSSM_RETURN *StatusCodes;
65
66 /* index into raw cert group or AnchorCerts depending on IS_IN_ANCHORS */
67 uint32 Index;
68
69 /* nonzero if cert came from a DLDB */
70 CSSM_DL_DB_HANDLE DlDbHandle;
71 CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord;
72
73 /* CRLReason code if cert is revoked */
74 sint32 CrlReason;
75
76 } CSSM_TP_APPLE_EVIDENCE_INFO;
77
78 #pragma clang diagnostic pop
79
80 #ifdef __cplusplus
81 }
82 #endif // __cplusplus
83
84 #endif /* _CSSMAPPLE_H_ */