2 * Copyright (c) 1999-2001,2004,2011,2014 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
23 * cssmkrapi.h -- Application Programmers Interface for Key Recovery Modules
27 #define _CSSMKRAPI_H_ 1
29 #include <Security/cssmtype.h>
35 #pragma clang diagnostic push
36 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
38 typedef uint32 CSSM_KRSP_HANDLE
; /* Key Recovery Service Provider Handle */
40 typedef struct cssm_kr_name
{
41 uint8 Type
; /* namespace type */
42 uint8 Length
; /* name string length */
43 char *Name
; /* name string */
44 } CSSM_KR_NAME DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
46 typedef struct DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER cssm_kr_profile
{
47 CSSM_KR_NAME UserName
; /* name of the user */
48 CSSM_CERTGROUP_PTR UserCertificate
; /* public key certificate of the user */
49 CSSM_CERTGROUP_PTR KRSCertChain
; /* cert chain for the KRSP coordinator */
50 uint8 LE_KRANum
; /* number of KRA cert chains in the following list */
51 CSSM_CERTGROUP_PTR LE_KRACertChainList
; /* list of Law enforcement KRA certificate chains */
52 uint8 ENT_KRANum
; /* number of KRA cert chains in the following list */
53 CSSM_CERTGROUP_PTR ENT_KRACertChainList
; /* list of Enterprise KRA certificate chains */
54 uint8 INDIV_KRANum
; /* number of KRA cert chains in the following list */
55 CSSM_CERTGROUP_PTR INDIV_KRACertChainList
; /* list of Individual KRA certificate chains */
56 CSSM_DATA_PTR INDIV_AuthenticationInfo
; /* authentication information for individual key recovery */
57 uint32 KRSPFlags
; /* flag values to be interpreted by KRSP */
58 CSSM_DATA_PTR KRSPExtensions
; /* reserved for extensions specific to KRSPs */
59 } CSSM_KR_PROFILE DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_KR_PROFILE_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
61 typedef struct DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER cssm_kr_wrappedproductinfo
{
62 CSSM_VERSION StandardVersion
;
63 CSSM_STRING StandardDescription
;
64 CSSM_VERSION ProductVersion
;
65 CSSM_STRING ProductDescription
;
66 CSSM_STRING ProductVendor
;
68 } CSSM_KR_WRAPPEDPRODUCT_INFO DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_KR_WRAPPEDPRODUCT_INFO_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
70 typedef struct DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER cssm_krsubservice
{
72 char *Description
; /* Description of this sub service */
73 CSSM_KR_WRAPPEDPRODUCT_INFO WrappedProduct
;
74 } CSSM_KRSUBSERVICE DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_KRSUBSERVICE_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
76 typedef uint32 CSSM_KR_POLICY_TYPE
;
77 #define CSSM_KR_INDIV_POLICY (0x00000001)
78 #define CSSM_KR_ENT_POLICY (0x00000002)
79 #define CSSM_KR_LE_MAN_POLICY (0x00000003)
80 #define CSSM_KR_LE_USE_POLICY (0x00000004)
82 typedef uint32 CSSM_KR_POLICY_FLAGS
;
84 #define CSSM_KR_INDIV (0x00000001)
85 #define CSSM_KR_ENT (0x00000002)
86 #define CSSM_KR_LE_MAN (0x00000004)
87 #define CSSM_KR_LE_USE (0x00000008)
88 #define CSSM_KR_LE (CSSM_KR_LE_MAN | CSSM_KR_LE_USE)
89 #define CSSM_KR_OPTIMIZE (0x00000010)
90 #define CSSM_KR_DROP_WORKFACTOR (0x00000020)
92 typedef struct DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER cssm_kr_policy_list_item
{
93 struct kr_policy_list_item
*next
;
94 CSSM_ALGORITHMS AlgorithmId
;
95 CSSM_ENCRYPT_MODE Mode
;
99 CSSM_KR_POLICY_FLAGS PolicyFlags
;
100 CSSM_CONTEXT_TYPE AlgClass
;
101 } CSSM_KR_POLICY_LIST_ITEM DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_KR_POLICY_LIST_ITEM_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
103 typedef struct DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER cssm_kr_policy_info
{
104 CSSM_BOOL krbNotAllowed
;
105 uint32 numberOfEntries
;
106 CSSM_KR_POLICY_LIST_ITEM
*policyEntry
;
107 } CSSM_KR_POLICY_INFO DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_KR_POLICY_INFO_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
110 #pragma clang diagnostic pop
116 #endif /* _CSSMKRAPI_H_ */