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 * cssmkrspi.h -- Service Provider Interface for Key Recovery Modules
27 #define _CSSMKRSPI_H_ 1
29 #include <Security/cssmtype.h>
30 #include <Security/cssmkrapi.h> /* CSSM_KRSP_HANDLE */
36 #pragma clang diagnostic push
37 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
39 /* Data types for Key Recovery SPI */
41 typedef struct DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER cssm_spi_kr_funcs
{
42 CSSM_RETURN (CSSMKRI
*RegistrationRequest
)
43 (CSSM_KRSP_HANDLE KRSPHandle
,
44 CSSM_CC_HANDLE KRRegistrationContextHandle
,
45 const CSSM_CONTEXT
*KRRegistrationContext
,
46 const CSSM_DATA
*KRInData
,
47 const CSSM_ACCESS_CREDENTIALS
*AccessCredentials
,
48 CSSM_KR_POLICY_FLAGS KRFlags
,
49 sint32
*EstimatedTime
,
50 CSSM_HANDLE_PTR ReferenceHandle
);
51 CSSM_RETURN (CSSMKRI
*RegistrationRetrieve
)
52 (CSSM_KRSP_HANDLE KRSPHandle
,
53 CSSM_HANDLE ReferenceHandle
,
54 sint32
*EstimatedTime
,
55 CSSM_KR_PROFILE_PTR KRProfile
);
56 CSSM_RETURN (CSSMKRI
*GenerateRecoveryFields
)
57 (CSSM_KRSP_HANDLE KRSPHandle
,
58 CSSM_CC_HANDLE KREnablementContextHandle
,
59 const CSSM_CONTEXT
*KREnablementContext
,
60 CSSM_CC_HANDLE CryptoContextHandle
,
61 const CSSM_CONTEXT
*CryptoContext
,
62 const CSSM_DATA
*KRSPOptions
,
63 CSSM_KR_POLICY_FLAGS KRFlags
,
64 CSSM_DATA_PTR KRFields
);
65 CSSM_RETURN (CSSMKRI
*ProcessRecoveryFields
)
66 (CSSM_KRSP_HANDLE KRSPHandle
,
67 CSSM_CC_HANDLE KREnablementContextHandle
,
68 const CSSM_CONTEXT
*KREnablementContext
,
69 CSSM_CC_HANDLE CryptoContextHandle
,
70 const CSSM_CONTEXT
*CryptoContext
,
71 const CSSM_DATA
*KRSPOptions
,
72 CSSM_KR_POLICY_FLAGS KRFlags
,
73 const CSSM_DATA
*KRFields
);
74 CSSM_RETURN (CSSMKRI
*RecoveryRequest
)
75 (CSSM_KRSP_HANDLE KRSPHandle
,
76 CSSM_CC_HANDLE KRRequestContextHandle
,
77 const CSSM_CONTEXT
*KRRequestContext
,
78 const CSSM_DATA
*KRInData
,
79 const CSSM_ACCESS_CREDENTIALS
*AccessCredentials
,
80 sint32
*EstimatedTime
,
81 CSSM_HANDLE_PTR ReferenceHandle
);
82 CSSM_RETURN (CSSMKRI
*RecoveryRetrieve
)
83 (CSSM_KRSP_HANDLE KRSPHandle
,
84 CSSM_HANDLE ReferenceHandle
,
85 sint32
*EstimatedTime
,
86 CSSM_HANDLE_PTR CacheHandle
,
87 uint32
*NumberOfRecoveredKeys
);
88 CSSM_RETURN (CSSMKRI
*GetRecoveredObject
)
89 (CSSM_KRSP_HANDLE KRSPHandle
,
90 CSSM_HANDLE CacheHandle
,
91 uint32 IndexInResults
,
92 CSSM_CSP_HANDLE CSPHandle
,
93 const CSSM_RESOURCE_CONTROL_CONTEXT
*CredAndAclEntry
,
95 CSSM_KEY_PTR RecoveredKey
,
96 CSSM_DATA_PTR OtherInfo
);
97 CSSM_RETURN (CSSMKRI
*RecoveryRequestAbort
)
98 (CSSM_KRSP_HANDLE KRSPHandle
,
99 CSSM_HANDLE ResultsHandle
);
100 CSSM_RETURN (CSSMKRI
*PassThrough
)
101 (CSSM_KRSP_HANDLE KRSPHandle
,
102 CSSM_CC_HANDLE KeyRecoveryContextHandle
,
103 const CSSM_CONTEXT
*KeyRecoveryContext
,
104 CSSM_CC_HANDLE CryptoContextHandle
,
105 const CSSM_CONTEXT
*CryptoContext
,
106 uint32 PassThroughId
,
107 const void *InputParams
,
108 void **OutputParams
);
109 } CSSM_SPI_KR_FUNCS DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_SPI_KR_FUNCS_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
111 #pragma clang diagnostic pop
117 #endif /* _CSSMKRSPI_H_ */