| OLD | NEW |
| (Empty) |
| 1 /* This Source Code Form is subject to the terms of the Mozilla Public | |
| 2 * License, v. 2.0. If a copy of the MPL was not distributed with this | |
| 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| 4 /* | |
| 5 * pkix_pl_ldapcertstore.h | |
| 6 * | |
| 7 * LDAPCertstore Object Type Definition | |
| 8 * | |
| 9 */ | |
| 10 | |
| 11 #ifndef _PKIX_PL_LDAPCERTSTORE_H | |
| 12 #define _PKIX_PL_LDAPCERTSTORE_H | |
| 13 | |
| 14 #include "pkix_pl_ldapt.h" | |
| 15 #include "pkix_pl_common.h" | |
| 16 | |
| 17 #ifdef __cplusplus | |
| 18 extern "C" { | |
| 19 #endif | |
| 20 | |
| 21 /* | |
| 22 * At the time of this version, there are unresolved questions about the LDAP | |
| 23 * protocol. Although RFC1777 describes a BIND and UNBIND message, it is not | |
| 24 * clear whether they are appropriate to this application. We have tested only | |
| 25 * using servers that do not expect authentication, and that reject BIND | |
| 26 * messages. It is not clear what values might be appropriate for the bindname | |
| 27 * and authentication fields, which are currently implemented as char strings | |
| 28 * supplied by the caller. (If this changes, the API and possibly the templates | |
| 29 * will have to change.) Therefore the CertStore_Create API contains a BindAPI | |
| 30 * structure, a union, which will have to be revised and extended when this | |
| 31 * area of the protocol is better understood. | |
| 32 * | |
| 33 * It is further assumed that a given LdapCertStore will connect only to a | |
| 34 * single server, and that the creation of the socket will initiate the | |
| 35 * CONNECT. Therefore the LdapCertStore handles only the case of continuing | |
| 36 * the connection, if nonblocking I/O is being used. | |
| 37 */ | |
| 38 | |
| 39 typedef enum { | |
| 40 LDAP_CONNECT_PENDING, | |
| 41 LDAP_CONNECTED, | |
| 42 LDAP_BIND_PENDING, | |
| 43 LDAP_BIND_RESPONSE, | |
| 44 LDAP_BIND_RESPONSE_PENDING, | |
| 45 LDAP_BOUND, | |
| 46 LDAP_SEND_PENDING, | |
| 47 LDAP_RECV, | |
| 48 LDAP_RECV_PENDING, | |
| 49 LDAP_RECV_INITIAL, | |
| 50 LDAP_RECV_NONINITIAL, | |
| 51 LDAP_ABANDON_PENDING | |
| 52 } LDAPConnectStatus; | |
| 53 | |
| 54 #define LDAP_CACHEBUCKETS 128 | |
| 55 #define RCVBUFSIZE 512 | |
| 56 | |
| 57 struct PKIX_PL_LdapCertStoreContext { | |
| 58 PKIX_PL_LdapClient *client; | |
| 59 }; | |
| 60 | |
| 61 /* see source file for function documentation */ | |
| 62 | |
| 63 PKIX_Error *pkix_pl_LdapCertStoreContext_RegisterSelf(void *plContext); | |
| 64 | |
| 65 PKIX_Error * | |
| 66 pkix_pl_LdapCertStore_BuildCertList( | |
| 67 PKIX_List *responseList, | |
| 68 PKIX_List **pCerts, | |
| 69 void *plContext); | |
| 70 | |
| 71 #ifdef __cplusplus | |
| 72 } | |
| 73 #endif | |
| 74 | |
| 75 #endif /* _PKIX_PL_LDAPCERTSTORE_H */ | |
| OLD | NEW |