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 * cssmcli.h -- Service Provider Interface for Certificate Library 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_cl_funcs
{
39 CSSM_RETURN (CSSMCLI
*CertCreateTemplate
)
40 (CSSM_CL_HANDLE CLHandle
,
41 uint32 NumberOfFields
,
42 const CSSM_FIELD
*CertFields
,
43 CSSM_DATA_PTR CertTemplate
);
44 CSSM_RETURN (CSSMCLI
*CertGetAllTemplateFields
)
45 (CSSM_CL_HANDLE CLHandle
,
46 const CSSM_DATA
*CertTemplate
,
47 uint32
*NumberOfFields
,
48 CSSM_FIELD_PTR
*CertFields
);
49 CSSM_RETURN (CSSMCLI
*CertSign
)
50 (CSSM_CL_HANDLE CLHandle
,
51 CSSM_CC_HANDLE CCHandle
,
52 const CSSM_DATA
*CertTemplate
,
53 const CSSM_FIELD
*SignScope
,
55 CSSM_DATA_PTR SignedCert
);
56 CSSM_RETURN (CSSMCLI
*CertVerify
)
57 (CSSM_CL_HANDLE CLHandle
,
58 CSSM_CC_HANDLE CCHandle
,
59 const CSSM_DATA
*CertToBeVerified
,
60 const CSSM_DATA
*SignerCert
,
61 const CSSM_FIELD
*VerifyScope
,
63 CSSM_RETURN (CSSMCLI
*CertVerifyWithKey
)
64 (CSSM_CL_HANDLE CLHandle
,
65 CSSM_CC_HANDLE CCHandle
,
66 const CSSM_DATA
*CertToBeVerified
);
67 CSSM_RETURN (CSSMCLI
*CertGetFirstFieldValue
)
68 (CSSM_CL_HANDLE CLHandle
,
69 const CSSM_DATA
*Cert
,
70 const CSSM_OID
*CertField
,
71 CSSM_HANDLE_PTR ResultsHandle
,
72 uint32
*NumberOfMatchedFields
,
73 CSSM_DATA_PTR
*Value
);
74 CSSM_RETURN (CSSMCLI
*CertGetNextFieldValue
)
75 (CSSM_CL_HANDLE CLHandle
,
76 CSSM_HANDLE ResultsHandle
,
77 CSSM_DATA_PTR
*Value
);
78 CSSM_RETURN (CSSMCLI
*CertAbortQuery
)
79 (CSSM_CL_HANDLE CLHandle
,
80 CSSM_HANDLE ResultsHandle
);
81 CSSM_RETURN (CSSMCLI
*CertGetKeyInfo
)
82 (CSSM_CL_HANDLE CLHandle
,
83 const CSSM_DATA
*Cert
,
85 CSSM_RETURN (CSSMCLI
*CertGetAllFields
)
86 (CSSM_CL_HANDLE CLHandle
,
87 const CSSM_DATA
*Cert
,
88 uint32
*NumberOfFields
,
89 CSSM_FIELD_PTR
*CertFields
);
90 CSSM_RETURN (CSSMCLI
*FreeFields
)
91 (CSSM_CL_HANDLE CLHandle
,
92 uint32 NumberOfFields
,
93 CSSM_FIELD_PTR
*FieldArray
);
94 CSSM_RETURN (CSSMCLI
*FreeFieldValue
)
95 (CSSM_CL_HANDLE CLHandle
,
96 const CSSM_OID
*CertOrCrlOid
,
98 CSSM_RETURN (CSSMCLI
*CertCache
)
99 (CSSM_CL_HANDLE CLHandle
,
100 const CSSM_DATA
*Cert
,
101 CSSM_HANDLE_PTR CertHandle
);
102 CSSM_RETURN (CSSMCLI
*CertGetFirstCachedFieldValue
)
103 (CSSM_CL_HANDLE CLHandle
,
104 CSSM_HANDLE CertHandle
,
105 const CSSM_OID
*CertField
,
106 CSSM_HANDLE_PTR ResultsHandle
,
107 uint32
*NumberOfMatchedFields
,
108 CSSM_DATA_PTR
*Value
);
109 CSSM_RETURN (CSSMCLI
*CertGetNextCachedFieldValue
)
110 (CSSM_CL_HANDLE CLHandle
,
111 CSSM_HANDLE ResultsHandle
,
112 CSSM_DATA_PTR
*Value
);
113 CSSM_RETURN (CSSMCLI
*CertAbortCache
)
114 (CSSM_CL_HANDLE CLHandle
,
115 CSSM_HANDLE CertHandle
);
116 CSSM_RETURN (CSSMCLI
*CertGroupToSignedBundle
)
117 (CSSM_CL_HANDLE CLHandle
,
118 CSSM_CC_HANDLE CCHandle
,
119 const CSSM_CERTGROUP
*CertGroupToBundle
,
120 const CSSM_CERT_BUNDLE_HEADER
*BundleInfo
,
121 CSSM_DATA_PTR SignedBundle
);
122 CSSM_RETURN (CSSMCLI
*CertGroupFromVerifiedBundle
)
123 (CSSM_CL_HANDLE CLHandle
,
124 CSSM_CC_HANDLE CCHandle
,
125 const CSSM_CERT_BUNDLE
*CertBundle
,
126 const CSSM_DATA
*SignerCert
,
127 CSSM_CERTGROUP_PTR
*CertGroup
);
128 CSSM_RETURN (CSSMCLI
*CertDescribeFormat
)
129 (CSSM_CL_HANDLE CLHandle
,
130 uint32
*NumberOfFields
,
131 CSSM_OID_PTR
*OidList
);
132 CSSM_RETURN (CSSMCLI
*CrlCreateTemplate
)
133 (CSSM_CL_HANDLE CLHandle
,
134 uint32 NumberOfFields
,
135 const CSSM_FIELD
*CrlTemplate
,
136 CSSM_DATA_PTR NewCrl
);
137 CSSM_RETURN (CSSMCLI
*CrlSetFields
)
138 (CSSM_CL_HANDLE CLHandle
,
139 uint32 NumberOfFields
,
140 const CSSM_FIELD
*CrlTemplate
,
141 const CSSM_DATA
*OldCrl
,
142 CSSM_DATA_PTR ModifiedCrl
);
143 CSSM_RETURN (CSSMCLI
*CrlAddCert
)
144 (CSSM_CL_HANDLE CLHandle
,
145 CSSM_CC_HANDLE CCHandle
,
146 const CSSM_DATA
*Cert
,
147 uint32 NumberOfFields
,
148 const CSSM_FIELD
*CrlEntryFields
,
149 const CSSM_DATA
*OldCrl
,
150 CSSM_DATA_PTR NewCrl
);
151 CSSM_RETURN (CSSMCLI
*CrlRemoveCert
)
152 (CSSM_CL_HANDLE CLHandle
,
153 const CSSM_DATA
*Cert
,
154 const CSSM_DATA
*OldCrl
,
155 CSSM_DATA_PTR NewCrl
);
156 CSSM_RETURN (CSSMCLI
*CrlSign
)
157 (CSSM_CL_HANDLE CLHandle
,
158 CSSM_CC_HANDLE CCHandle
,
159 const CSSM_DATA
*UnsignedCrl
,
160 const CSSM_FIELD
*SignScope
,
162 CSSM_DATA_PTR SignedCrl
);
163 CSSM_RETURN (CSSMCLI
*CrlVerify
)
164 (CSSM_CL_HANDLE CLHandle
,
165 CSSM_CC_HANDLE CCHandle
,
166 const CSSM_DATA
*CrlToBeVerified
,
167 const CSSM_DATA
*SignerCert
,
168 const CSSM_FIELD
*VerifyScope
,
170 CSSM_RETURN (CSSMCLI
*CrlVerifyWithKey
)
171 (CSSM_CL_HANDLE CLHandle
,
172 CSSM_CC_HANDLE CCHandle
,
173 const CSSM_DATA
*CrlToBeVerified
);
174 CSSM_RETURN (CSSMCLI
*IsCertInCrl
)
175 (CSSM_CL_HANDLE CLHandle
,
176 const CSSM_DATA
*Cert
,
177 const CSSM_DATA
*Crl
,
178 CSSM_BOOL
*CertFound
);
179 CSSM_RETURN (CSSMCLI
*CrlGetFirstFieldValue
)
180 (CSSM_CL_HANDLE CLHandle
,
181 const CSSM_DATA
*Crl
,
182 const CSSM_OID
*CrlField
,
183 CSSM_HANDLE_PTR ResultsHandle
,
184 uint32
*NumberOfMatchedFields
,
185 CSSM_DATA_PTR
*Value
);
186 CSSM_RETURN (CSSMCLI
*CrlGetNextFieldValue
)
187 (CSSM_CL_HANDLE CLHandle
,
188 CSSM_HANDLE ResultsHandle
,
189 CSSM_DATA_PTR
*Value
);
190 CSSM_RETURN (CSSMCLI
*CrlAbortQuery
)
191 (CSSM_CL_HANDLE CLHandle
,
192 CSSM_HANDLE ResultsHandle
);
193 CSSM_RETURN (CSSMCLI
*CrlGetAllFields
)
194 (CSSM_CL_HANDLE CLHandle
,
195 const CSSM_DATA
*Crl
,
196 uint32
*NumberOfCrlFields
,
197 CSSM_FIELD_PTR
*CrlFields
);
198 CSSM_RETURN (CSSMCLI
*CrlCache
)
199 (CSSM_CL_HANDLE CLHandle
,
200 const CSSM_DATA
*Crl
,
201 CSSM_HANDLE_PTR CrlHandle
);
202 CSSM_RETURN (CSSMCLI
*IsCertInCachedCrl
)
203 (CSSM_CL_HANDLE CLHandle
,
204 const CSSM_DATA
*Cert
,
205 CSSM_HANDLE CrlHandle
,
206 CSSM_BOOL
*CertFound
,
207 CSSM_DATA_PTR CrlRecordIndex
);
208 CSSM_RETURN (CSSMCLI
*CrlGetFirstCachedFieldValue
)
209 (CSSM_CL_HANDLE CLHandle
,
210 CSSM_HANDLE CrlHandle
,
211 const CSSM_DATA
*CrlRecordIndex
,
212 const CSSM_OID
*CrlField
,
213 CSSM_HANDLE_PTR ResultsHandle
,
214 uint32
*NumberOfMatchedFields
,
215 CSSM_DATA_PTR
*Value
);
216 CSSM_RETURN (CSSMCLI
*CrlGetNextCachedFieldValue
)
217 (CSSM_CL_HANDLE CLHandle
,
218 CSSM_HANDLE ResultsHandle
,
219 CSSM_DATA_PTR
*Value
);
220 CSSM_RETURN (CSSMCLI
*CrlGetAllCachedRecordFields
)
221 (CSSM_CL_HANDLE CLHandle
,
222 CSSM_HANDLE CrlHandle
,
223 const CSSM_DATA
*CrlRecordIndex
,
224 uint32
*NumberOfFields
,
225 CSSM_FIELD_PTR
*CrlFields
);
226 CSSM_RETURN (CSSMCLI
*CrlAbortCache
)
227 (CSSM_CL_HANDLE CLHandle
,
228 CSSM_HANDLE CrlHandle
);
229 CSSM_RETURN (CSSMCLI
*CrlDescribeFormat
)
230 (CSSM_CL_HANDLE CLHandle
,
231 uint32
*NumberOfFields
,
232 CSSM_OID_PTR
*OidList
);
233 CSSM_RETURN (CSSMCLI
*PassThrough
)
234 (CSSM_CL_HANDLE CLHandle
,
235 CSSM_CC_HANDLE CCHandle
,
236 uint32 PassThroughId
,
237 const void *InputParams
,
238 void **OutputParams
);
239 } CSSM_SPI_CL_FUNCS DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
, *CSSM_SPI_CL_FUNCS_PTR DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
241 #pragma clang diagnostic pop
247 #endif /* _CSSMCLI_H_ */