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 * cssmtpi.h -- Service Provider Interface for Trust Policy Modules
29 #include <Security/cssmtype.h>
35 #pragma clang diagnostic push
36 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
38 typedef struct DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER cssm_spi_tp_funcs
{
39 CSSM_RETURN (CSSMTPI
*SubmitCredRequest
)
40 (CSSM_TP_HANDLE TPHandle
,
41 const CSSM_TP_AUTHORITY_ID
*PreferredAuthority
,
42 CSSM_TP_AUTHORITY_REQUEST_TYPE RequestType
,
43 const CSSM_TP_REQUEST_SET
*RequestInput
,
44 const CSSM_TP_CALLERAUTH_CONTEXT
*CallerAuthContext
,
45 sint32
*EstimatedTime
,
46 CSSM_DATA_PTR ReferenceIdentifier
);
47 CSSM_RETURN (CSSMTPI
*RetrieveCredResult
)
48 (CSSM_TP_HANDLE TPHandle
,
49 const CSSM_DATA
*ReferenceIdentifier
,
50 const CSSM_TP_CALLERAUTH_CONTEXT
*CallerAuthCredentials
,
51 sint32
*EstimatedTime
,
52 CSSM_BOOL
*ConfirmationRequired
,
53 CSSM_TP_RESULT_SET_PTR
*RetrieveOutput
);
54 CSSM_RETURN (CSSMTPI
*ConfirmCredResult
)
55 (CSSM_TP_HANDLE TPHandle
,
56 const CSSM_DATA
*ReferenceIdentifier
,
57 const CSSM_TP_CALLERAUTH_CONTEXT
*CallerAuthCredentials
,
58 const CSSM_TP_CONFIRM_RESPONSE
*Responses
,
59 const CSSM_TP_AUTHORITY_ID
*PreferredAuthority
);
60 CSSM_RETURN (CSSMTPI
*ReceiveConfirmation
)
61 (CSSM_TP_HANDLE TPHandle
,
62 const CSSM_DATA
*ReferenceIdentifier
,
63 CSSM_TP_CONFIRM_RESPONSE_PTR
*Responses
,
65 CSSM_RETURN (CSSMTPI
*CertReclaimKey
)
66 (CSSM_TP_HANDLE TPHandle
,
67 const CSSM_CERTGROUP
*CertGroup
,
69 CSSM_LONG_HANDLE KeyCacheHandle
,
70 CSSM_CSP_HANDLE CSPHandle
,
71 const CSSM_RESOURCE_CONTROL_CONTEXT
*CredAndAclEntry
);
72 CSSM_RETURN (CSSMTPI
*CertReclaimAbort
)
73 (CSSM_TP_HANDLE TPHandle
,
74 CSSM_LONG_HANDLE KeyCacheHandle
);
75 CSSM_RETURN (CSSMTPI
*FormRequest
)
76 (CSSM_TP_HANDLE TPHandle
,
77 const CSSM_TP_AUTHORITY_ID
*PreferredAuthority
,
78 CSSM_TP_FORM_TYPE FormType
,
79 CSSM_DATA_PTR BlankForm
);
80 CSSM_RETURN (CSSMTPI
*FormSubmit
)
81 (CSSM_TP_HANDLE TPHandle
,
82 CSSM_TP_FORM_TYPE FormType
,
83 const CSSM_DATA
*Form
,
84 const CSSM_TP_AUTHORITY_ID
*ClearanceAuthority
,
85 const CSSM_TP_AUTHORITY_ID
*RepresentedAuthority
,
86 CSSM_ACCESS_CREDENTIALS_PTR Credentials
);
87 CSSM_RETURN (CSSMTPI
*CertGroupVerify
)
88 (CSSM_TP_HANDLE TPHandle
,
89 CSSM_CL_HANDLE CLHandle
,
90 CSSM_CSP_HANDLE CSPHandle
,
91 const CSSM_CERTGROUP
*CertGroupToBeVerified
,
92 const CSSM_TP_VERIFY_CONTEXT
*VerifyContext
,
93 CSSM_TP_VERIFY_CONTEXT_RESULT_PTR VerifyContextResult
);
94 CSSM_RETURN (CSSMTPI
*CertCreateTemplate
)
95 (CSSM_TP_HANDLE TPHandle
,
96 CSSM_CL_HANDLE CLHandle
,
97 uint32 NumberOfFields
,
98 const CSSM_FIELD
*CertFields
,
99 CSSM_DATA_PTR CertTemplate
);
100 CSSM_RETURN (CSSMTPI
*CertGetAllTemplateFields
)
101 (CSSM_TP_HANDLE TPHandle
,
102 CSSM_CL_HANDLE CLHandle
,
103 const CSSM_DATA
*CertTemplate
,
104 uint32
*NumberOfFields
,
105 CSSM_FIELD_PTR
*CertFields
);
106 CSSM_RETURN (CSSMTPI
*CertSign
)
107 (CSSM_TP_HANDLE TPHandle
,
108 CSSM_CL_HANDLE CLHandle
,
109 CSSM_CC_HANDLE CCHandle
,
110 const CSSM_DATA
*CertTemplateToBeSigned
,
111 const CSSM_CERTGROUP
*SignerCertGroup
,
112 const CSSM_TP_VERIFY_CONTEXT
*SignerVerifyContext
,
113 CSSM_TP_VERIFY_CONTEXT_RESULT_PTR SignerVerifyResult
,
114 CSSM_DATA_PTR SignedCert
);
115 CSSM_RETURN (CSSMTPI
*CrlVerify
)
116 (CSSM_TP_HANDLE TPHandle
,
117 CSSM_CL_HANDLE CLHandle
,
118 CSSM_CSP_HANDLE CSPHandle
,
119 const CSSM_ENCODED_CRL
*CrlToBeVerified
,
120 const CSSM_CERTGROUP
*SignerCertGroup
,
121 const CSSM_TP_VERIFY_CONTEXT
*VerifyContext
,
122 CSSM_TP_VERIFY_CONTEXT_RESULT_PTR RevokerVerifyResult
);
123 CSSM_RETURN (CSSMTPI
*CrlCreateTemplate
)
124 (CSSM_TP_HANDLE TPHandle
,
125 CSSM_CL_HANDLE CLHandle
,
126 uint32 NumberOfFields
,
127 const CSSM_FIELD
*CrlFields
,
128 CSSM_DATA_PTR NewCrlTemplate
);
129 CSSM_RETURN (CSSMTPI
*CertRevoke
)
130 (CSSM_TP_HANDLE TPHandle
,
131 CSSM_CL_HANDLE CLHandle
,
132 CSSM_CSP_HANDLE CSPHandle
,
133 const CSSM_DATA
*OldCrlTemplate
,
134 const CSSM_CERTGROUP
*CertGroupToBeRevoked
,
135 const CSSM_CERTGROUP
*RevokerCertGroup
,
136 const CSSM_TP_VERIFY_CONTEXT
*RevokerVerifyContext
,
137 CSSM_TP_VERIFY_CONTEXT_RESULT_PTR RevokerVerifyResult
,
138 CSSM_TP_CERTCHANGE_REASON Reason
,
139 CSSM_DATA_PTR NewCrlTemplate
);
140 CSSM_RETURN (CSSMTPI
*CertRemoveFromCrlTemplate
)
141 (CSSM_TP_HANDLE TPHandle
,
142 CSSM_CL_HANDLE CLHandle
,
143 CSSM_CSP_HANDLE CSPHandle
,
144 const CSSM_DATA
*OldCrlTemplate
,
145 const CSSM_CERTGROUP
*CertGroupToBeRemoved
,
146 const CSSM_CERTGROUP
*RevokerCertGroup
,
147 const CSSM_TP_VERIFY_CONTEXT
*RevokerVerifyContext
,
148 CSSM_TP_VERIFY_CONTEXT_RESULT_PTR RevokerVerifyResult
,
149 CSSM_DATA_PTR NewCrlTemplate
);
150 CSSM_RETURN (CSSMTPI
*CrlSign
)
151 (CSSM_TP_HANDLE TPHandle
,
152 CSSM_CL_HANDLE CLHandle
,
153 CSSM_CC_HANDLE CCHandle
,
154 const CSSM_ENCODED_CRL
*CrlToBeSigned
,
155 const CSSM_CERTGROUP
*SignerCertGroup
,
156 const CSSM_TP_VERIFY_CONTEXT
*SignerVerifyContext
,
157 CSSM_TP_VERIFY_CONTEXT_RESULT_PTR SignerVerifyResult
,
158 CSSM_DATA_PTR SignedCrl
);
159 CSSM_RETURN (CSSMTPI
*ApplyCrlToDb
)
160 (CSSM_TP_HANDLE TPHandle
,
161 CSSM_CL_HANDLE CLHandle
,
162 CSSM_CSP_HANDLE CSPHandle
,
163 const CSSM_ENCODED_CRL
*CrlToBeApplied
,
164 const CSSM_CERTGROUP
*SignerCertGroup
,
165 const CSSM_TP_VERIFY_CONTEXT
*ApplyCrlVerifyContext
,
166 CSSM_TP_VERIFY_CONTEXT_RESULT_PTR ApplyCrlVerifyResult
);
167 CSSM_RETURN (CSSMTPI
*CertGroupConstruct
)
168 (CSSM_TP_HANDLE TPHandle
,
169 CSSM_CL_HANDLE CLHandle
,
170 CSSM_CSP_HANDLE CSPHandle
,
171 const CSSM_DL_DB_LIST
*DBList
,
172 const void *ConstructParams
,
173 const CSSM_CERTGROUP
*CertGroupFrag
,
174 CSSM_CERTGROUP_PTR
*CertGroup
);
175 CSSM_RETURN (CSSMTPI
*CertGroupPrune
)
176 (CSSM_TP_HANDLE TPHandle
,
177 CSSM_CL_HANDLE CLHandle
,
178 const CSSM_DL_DB_LIST
*DBList
,
179 const CSSM_CERTGROUP
*OrderedCertGroup
,
180 CSSM_CERTGROUP_PTR
*PrunedCertGroup
);
181 CSSM_RETURN (CSSMTPI
*CertGroupToTupleGroup
)
182 (CSSM_TP_HANDLE TPHandle
,
183 CSSM_CL_HANDLE CLHandle
,
184 const CSSM_CERTGROUP
*CertGroup
,
185 CSSM_TUPLEGROUP_PTR
*TupleGroup
);
186 CSSM_RETURN (CSSMTPI
*TupleGroupToCertGroup
)
187 (CSSM_TP_HANDLE TPHandle
,
188 CSSM_CL_HANDLE CLHandle
,
189 const CSSM_TUPLEGROUP
*TupleGroup
,
190 CSSM_CERTGROUP_PTR
*CertTemplates
);
191 CSSM_RETURN (CSSMTPI
*PassThrough
)
192 (CSSM_TP_HANDLE TPHandle
,
193 CSSM_CL_HANDLE CLHandle
,
194 CSSM_CC_HANDLE CCHandle
,
195 const CSSM_DL_DB_LIST
*DBList
,
196 uint32 PassThroughId
,
197 const void *InputParams
,
198 void **OutputParams
);
199 } CSSM_SPI_TP_FUNCS DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_SPI_TP_FUNCS_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
201 #pragma clang diagnostic pop
207 #endif /* _CSSMTPI_H_ */