Apache Portable Runtime Utility Library
apr_ldap_option.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
21#ifndef APR_LDAP_OPTION_H
22#define APR_LDAP_OPTION_H
23
29#include "apr_ldap.h"
30
31#if APR_HAS_LDAP
32
33#ifdef __cplusplus
34extern "C" {
35#endif /* __cplusplus */
36
37/*
38 * The following defines handle the different TLS certificate
39 * options available. If these options are missing, APR will try and
40 * emulate support for this using the deprecated ldap_start_tls_s()
41 * function.
42 */
47#define APR_LDAP_OPT_TLS 0x6fff
52#define APR_LDAP_OPT_TLS_CERT 0x6ffe
57#define APR_LDAP_OPT_VERIFY_CERT 0x6ffd
62#define APR_LDAP_OPT_REFERRALS 0x6ffc
67#define APR_LDAP_OPT_REFHOPLIMIT 0x6ffb
68
120#define APR_LDAP_CA_TYPE_UNKNOWN 0
122#define APR_LDAP_CA_TYPE_DER 1
124#define APR_LDAP_CA_TYPE_BASE64 2
126#define APR_LDAP_CA_TYPE_CERT7_DB 3
128#define APR_LDAP_CA_TYPE_SECMOD 4
130#define APR_LDAP_CERT_TYPE_UNKNOWN 5
132#define APR_LDAP_CERT_TYPE_DER 6
134#define APR_LDAP_CERT_TYPE_BASE64 7
136#define APR_LDAP_CERT_TYPE_KEY3_DB 8
138#define APR_LDAP_CERT_TYPE_NICKNAME 9
140#define APR_LDAP_KEY_TYPE_UNKNOWN 10
142#define APR_LDAP_KEY_TYPE_DER 11
144#define APR_LDAP_KEY_TYPE_BASE64 12
146#define APR_LDAP_CERT_TYPE_PFX 13
148#define APR_LDAP_KEY_TYPE_PFX 14
152#define APR_LDAP_CA_TYPE_CACERTDIR_BASE64 15
153
154
165typedef struct apr_ldap_opt_tls_cert_t apr_ldap_opt_tls_cert_t;
166struct apr_ldap_opt_tls_cert_t {
167 int type;
168 const char *path;
169 const char *password;
170};
171
197#define APR_LDAP_NONE 0
199#define APR_LDAP_SSL 1
201#define APR_LDAP_STARTTLS 2
203#define APR_LDAP_STOPTLS 3
204
217APU_DECLARE_LDAP(int) apr_ldap_get_option(apr_pool_t *pool,
218 LDAP *ldap,
219 int option,
220 void *outvalue,
221 apr_ldap_err_t **result_err);
222
239APU_DECLARE_LDAP(int) apr_ldap_set_option(apr_pool_t *pool,
240 LDAP *ldap,
241 int option,
242 const void *invalue,
243 apr_ldap_err_t **result_err);
244
245#ifdef __cplusplus
246}
247#endif
248
249#endif /* APR_HAS_LDAP */
250
253#endif /* APR_LDAP_OPTION_H */
254
APR-UTIL LDAP.
Definition: apr_ldap.h:148