2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
20 // Apple X.509 CRL-related session functions.
23 #include "AppleX509CLSession.h"
26 AppleX509CLSession::CrlDescribeFormat(
27 uint32
&NumberOfFields
,
28 CSSM_OID_PTR
&OidList
)
35 AppleX509CLSession::CrlGetAllFields(
37 uint32
&NumberOfCrlFields
,
38 CSSM_FIELD_PTR
&CrlFields
)
45 AppleX509CLSession::CrlGetFirstFieldValue(
47 const CssmData
&CrlField
,
48 uint32
&NumberOfMatchedFields
,
52 return CSSM_INVALID_HANDLE
;
57 AppleX509CLSession::CrlGetNextFieldValue(
58 CSSM_HANDLE ResultsHandle
,
67 AppleX509CLSession::IsCertInCrl(
82 AppleX509CLSession::CrlCache(
84 CSSM_HANDLE
&CrlHandle
)
91 AppleX509CLSession::CrlGetFirstCachedFieldValue(
92 CSSM_HANDLE CrlHandle
,
93 const CssmData
*CrlRecordIndex
,
94 const CssmData
&CrlField
,
95 uint32
&NumberOfMatchedFields
,
99 return CSSM_INVALID_HANDLE
;
104 AppleX509CLSession::CrlGetNextCachedFieldValue(
105 CSSM_HANDLE ResultsHandle
,
106 CSSM_DATA_PTR
&Value
)
114 AppleX509CLSession::IsCertInCachedCrl(
115 const CssmData
&Cert
,
116 CSSM_HANDLE CrlHandle
,
117 CSSM_BOOL
&CertFound
,
118 CssmData
&CrlRecordIndex
)
125 AppleX509CLSession::CrlAbortCache(
126 CSSM_HANDLE CrlHandle
)
133 AppleX509CLSession::CrlAbortQuery(
134 CSSM_HANDLE ResultsHandle
)
142 #pragma mark Template
146 AppleX509CLSession::CrlCreateTemplate(
147 uint32 NumberOfFields
,
148 const CSSM_FIELD
*CrlTemplate
,
156 AppleX509CLSession::CrlSetFields(
157 uint32 NumberOfFields
,
158 const CSSM_FIELD
*CrlTemplate
,
159 const CssmData
&OldCrl
,
160 CssmData
&ModifiedCrl
)
167 AppleX509CLSession::CrlAddCert(
168 CSSM_CC_HANDLE CCHandle
,
169 const CssmData
&Cert
,
170 uint32 NumberOfFields
,
171 const CSSM_FIELD CrlEntryFields
[],
172 const CssmData
&OldCrl
,
180 AppleX509CLSession::CrlRemoveCert(
181 const CssmData
&Cert
,
182 const CssmData
&OldCrl
,
190 AppleX509CLSession::CrlGetAllCachedRecordFields(
191 CSSM_HANDLE CrlHandle
,
192 const CssmData
&CrlRecordIndex
,
193 uint32
&NumberOfFields
,
194 CSSM_FIELD_PTR
&CrlFields
)
200 AppleX509CLSession::CrlVerifyWithKey(
201 CSSM_CC_HANDLE CCHandle
,
202 const CssmData
&CrlToBeVerified
)
209 AppleX509CLSession::CrlVerify(
210 CSSM_CC_HANDLE CCHandle
,
211 const CssmData
&CrlToBeVerified
,
212 const CssmData
&SignerCert
,
213 const CSSM_FIELD
*VerifyScope
,
220 AppleX509CLSession::CrlSign(
221 CSSM_CC_HANDLE CCHandle
,
222 const CssmData
&UnsignedCrl
,
223 const CSSM_FIELD
*SignScope
,