]> git.saurik.com Git - apple/security.git/blob - CrlRefresh/ldapFetch.h
Security-164.1.tar.gz
[apple/security.git] / CrlRefresh / ldapFetch.h
1 /*
2 * Copyright (c) 2003 Apple Computer, Inc. All Rights Reserved.
3 *
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
7 * obtain a copy of the License at http://www.apple.com/publicsource and
8 * read it before using this file.
9 *
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
12 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
13 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
15 * Please see the License for the specific language governing rights and
16 * limitations under the License.
17 */
18
19 /*
20 * ldapFetch.h - fetch an entity via LDAP
21 */
22
23 #ifndef _LDAP_FETCH_H_
24 #define _LDAP_FETCH_H_
25
26 #include <Security/cssmtype.h>
27
28 typedef enum {
29 LT_Crl = 1,
30 LT_Cert
31 } LF_Type;
32
33 /* fetch via LDAP */
34 CSSM_RETURN ldapFetch(
35 const CSSM_DATA &url,
36 LF_Type lfType,
37 CSSM_DATA &fetched); // mallocd and RETURNED
38
39 /* fetch via HTTP */
40 CSSM_RETURN httpFetch(
41 const CSSM_DATA &url,
42 CSSM_DATA &fetched); // mallocd and RETURNED
43
44 /* Fetch from net, we figure out the schema */
45 CSSM_RETURN netFetch(
46 const CSSM_DATA &url,
47 LF_Type lfType,
48 CSSM_DATA &fetched); // mallocd and RETURNED
49
50 #endif /* _LDAP_FETCH_H_ */