Apache Portable Runtime Utility Library
|
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more 00002 * contributor license agreements. See the NOTICE file distributed with 00003 * this work for additional information regarding copyright ownership. 00004 * The ASF licenses this file to You under the Apache License, Version 2.0 00005 * (the "License"); you may not use this file except in compliance with 00006 * the License. You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00021 #ifndef APR_LDAP_OPTION_H 00022 #define APR_LDAP_OPTION_H 00023 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 00057 #define APR_LDAP_OPT_VERIFY_CERT 0x6ffd 00058 00062 #define APR_LDAP_OPT_REFERRALS 0x6ffc 00063 00067 #define APR_LDAP_OPT_REFHOPLIMIT 0x6ffb 00068 00120 #define APR_LDAP_CA_TYPE_UNKNOWN 0 00121 00122 #define APR_LDAP_CA_TYPE_DER 1 00123 00124 #define APR_LDAP_CA_TYPE_BASE64 2 00125 00126 #define APR_LDAP_CA_TYPE_CERT7_DB 3 00127 00128 #define APR_LDAP_CA_TYPE_SECMOD 4 00129 00130 #define APR_LDAP_CERT_TYPE_UNKNOWN 5 00131 00132 #define APR_LDAP_CERT_TYPE_DER 6 00133 00134 #define APR_LDAP_CERT_TYPE_BASE64 7 00135 00136 #define APR_LDAP_CERT_TYPE_KEY3_DB 8 00137 00138 #define APR_LDAP_CERT_TYPE_NICKNAME 9 00139 00140 #define APR_LDAP_KEY_TYPE_UNKNOWN 10 00141 00142 #define APR_LDAP_KEY_TYPE_DER 11 00143 00144 #define APR_LDAP_KEY_TYPE_BASE64 12 00145 00146 #define APR_LDAP_CERT_TYPE_PFX 13 00147 00148 #define APR_LDAP_KEY_TYPE_PFX 14 00149 00152 #define APR_LDAP_CA_TYPE_CACERTDIR_BASE64 15 00153 00154 00165 typedef struct apr_ldap_opt_tls_cert_t apr_ldap_opt_tls_cert_t; 00166 struct apr_ldap_opt_tls_cert_t { 00167 int type; 00168 const char *path; 00169 const char *password; 00170 }; 00171 00197 #define APR_LDAP_NONE 0 00198 00199 #define APR_LDAP_SSL 1 00200 00201 #define APR_LDAP_STARTTLS 2 00202 00203 #define APR_LDAP_STOPTLS 3 00204 00217 APU_DECLARE_LDAP(int) apr_ldap_get_option(apr_pool_t *pool, 00218 LDAP *ldap, 00219 int option, 00220 void *outvalue, 00221 apr_ldap_err_t **result_err); 00222 00239 APU_DECLARE_LDAP(int) apr_ldap_set_option(apr_pool_t *pool, 00240 LDAP *ldap, 00241 int option, 00242 const void *invalue, 00243 apr_ldap_err_t **result_err); 00244 00245 #ifdef __cplusplus 00246 } 00247 #endif 00248 00249 #endif /* APR_HAS_LDAP */ 00250 00253 #endif /* APR_LDAP_OPTION_H */ 00254