Main Page | Modules | Namespace List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

apr_ldap_option.h

Go to the documentation of this file.
00001 /* Copyright 2000-2004 The Apache Software Foundation
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *     http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS,
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  */
00015 
00020 #ifndef APR_LDAP_OPTION_H
00021 #define APR_LDAP_OPTION_H
00022 
00029 #include "apr_ldap.h"
00030 
00031 #if APR_HAS_LDAP
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif /* __cplusplus */
00036 
00037 /*
00038  * The following defines handle the different TLS certificate
00039  * options available. If these options are missing, APR will try and
00040  * emulate support for this using the deprecated ldap_start_tls_s()
00041  * function.
00042  */
00047 #define APR_LDAP_OPT_TLS 0x6fff
00048 
00052 #define APR_LDAP_OPT_TLS_CERT 0x6ffe
00053 
00105 #define APR_LDAP_CA_TYPE_UNKNOWN    0
00106 
00107 #define APR_LDAP_CA_TYPE_DER        1
00108 
00109 #define APR_LDAP_CA_TYPE_BASE64     2
00110 
00111 #define APR_LDAP_CA_TYPE_CERT7_DB   3
00112 
00113 #define APR_LDAP_CA_TYPE_SECMOD     4
00114 
00115 #define APR_LDAP_CERT_TYPE_UNKNOWN  5
00116 
00117 #define APR_LDAP_CERT_TYPE_DER      6
00118 
00119 #define APR_LDAP_CERT_TYPE_BASE64   7
00120 
00121 #define APR_LDAP_CERT_TYPE_KEY3_DB  8
00122 
00123 #define APR_LDAP_CERT_TYPE_NICKNAME 9
00124 
00125 #define APR_LDAP_KEY_TYPE_UNKNOWN   10
00126 
00127 #define APR_LDAP_KEY_TYPE_DER       11
00128 
00129 #define APR_LDAP_KEY_TYPE_BASE64    12
00130 
00131 #define APR_LDAP_CERT_TYPE_PFX      13
00132 
00133 #define APR_LDAP_KEY_TYPE_PFX       14
00134 
00145 typedef struct apr_ldap_opt_tls_cert_t apr_ldap_opt_tls_cert_t;
00146 struct apr_ldap_opt_tls_cert_t {
00147     int type;
00148     const char *path;
00149     const char *password;
00150 };
00151 
00177 #define APR_LDAP_NONE 0
00178 
00179 #define APR_LDAP_SSL 1
00180 
00181 #define APR_LDAP_STARTTLS 2
00182 
00183 #define APR_LDAP_STOPTLS 3
00184 
00197 APU_DECLARE(int) apr_ldap_get_option(apr_pool_t *pool,
00198                                      LDAP *ldap,
00199                                      int option,
00200                                      void *outvalue,
00201                                      apr_ldap_err_t **result_err);
00202 
00219 APU_DECLARE(int) apr_ldap_set_option(apr_pool_t *pool,
00220                                      LDAP *ldap,
00221                                      int option,
00222                                      const void *invalue,
00223                                      apr_ldap_err_t **result_err);
00224 
00225 #ifdef __cplusplus
00226 }
00227 #endif
00228 
00229 #endif /* APR_HAS_LDAP */
00230 
00233 #endif /* APR_LDAP_OPTION_H */
00234 

Generated on Thu Sep 8 12:20:49 2005 for Apache Portable Runtime Utility Library by  doxygen 1.4.4