[104e881] | 1 | /* |
---|
[fcb122d] | 2 | * Copyright 2004-2005 Paul Querna |
---|
[e021722] | 3 | * Copyright 2014 Nikos Mavrogiannopoulos |
---|
[8913410] | 4 | * Copyright 2015-2016 Thomas Klute |
---|
[7e2b223] | 5 | * |
---|
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
---|
| 7 | * you may not use this file except in compliance with the License. |
---|
| 8 | * You may obtain a copy of the License at |
---|
| 9 | * |
---|
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 11 | * |
---|
| 12 | * Unless required by applicable law or agreed to in writing, software |
---|
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 15 | * See the License for the specific language governing permissions and |
---|
| 16 | * limitations under the License. |
---|
| 17 | */ |
---|
| 18 | |
---|
[3b4c0d0] | 19 | /* Apache Runtime Headers */ |
---|
[7e2b223] | 20 | #include "httpd.h" |
---|
| 21 | #include "http_config.h" |
---|
| 22 | #include "http_protocol.h" |
---|
| 23 | #include "http_connection.h" |
---|
[76bd3bf] | 24 | #include "http_request.h" |
---|
[7e2b223] | 25 | #include "http_core.h" |
---|
| 26 | #include "http_log.h" |
---|
| 27 | #include "apr_buckets.h" |
---|
| 28 | #include "apr_strings.h" |
---|
| 29 | #include "apr_tables.h" |
---|
[482f47f] | 30 | #include "ap_release.h" |
---|
[9ddaa29] | 31 | #include "apr_fnmatch.h" |
---|
[3b4c0d0] | 32 | /* GnuTLS Library Headers */ |
---|
[31645b2] | 33 | #include <gnutls/gnutls.h> |
---|
[031acac] | 34 | #include <gnutls/abstract.h> |
---|
[e5bbda4] | 35 | #include <gnutls/openpgp.h> |
---|
[31645b2] | 36 | #include <gnutls/x509.h> |
---|
| 37 | |
---|
[05d56ce] | 38 | #ifndef __mod_gnutls_h_inc |
---|
| 39 | #define __mod_gnutls_h_inc |
---|
| 40 | |
---|
[6e0bfd6] | 41 | #define HAVE_APR_MEMCACHE @have_apr_memcache@ |
---|
[a66e147] | 42 | |
---|
[6d4de37] | 43 | extern module AP_MODULE_DECLARE_DATA gnutls_module; |
---|
[7e2b223] | 44 | |
---|
[3b4c0d0] | 45 | /* IO Filter names */ |
---|
[7e2b223] | 46 | #define GNUTLS_OUTPUT_FILTER_NAME "gnutls_output_filter" |
---|
| 47 | #define GNUTLS_INPUT_FILTER_NAME "gnutls_input_filter" |
---|
[3b4c0d0] | 48 | /* GnuTLS Constants */ |
---|
[7e2b223] | 49 | #define GNUTLS_ENABLED_FALSE 0 |
---|
| 50 | #define GNUTLS_ENABLED_TRUE 1 |
---|
[040387c] | 51 | #define GNUTLS_ENABLED_UNSET 2 |
---|
[3b4c0d0] | 52 | /* Current module version */ |
---|
[032ff02] | 53 | #define MOD_GNUTLS_VERSION "@MOD_GNUTLS_VERSION@" |
---|
| 54 | |
---|
[3b4c0d0] | 55 | /* Module Debug Mode */ |
---|
[032ff02] | 56 | #define MOD_GNUTLS_DEBUG @OOO_MAINTAIN@ |
---|
[3b4c0d0] | 57 | |
---|
| 58 | /* mod_gnutls Cache Types */ |
---|
| 59 | typedef enum { |
---|
| 60 | /* No Cache */ |
---|
[c301152] | 61 | mgs_cache_none, |
---|
[3b4c0d0] | 62 | /* Use Old Berkley DB */ |
---|
[c301152] | 63 | mgs_cache_dbm, |
---|
[3b4c0d0] | 64 | /* Use Gnu's version of Berkley DB */ |
---|
[d8c7cf4] | 65 | mgs_cache_gdbm, |
---|
[fcb122d] | 66 | #if HAVE_APR_MEMCACHE |
---|
[3b4c0d0] | 67 | /* Use Memcache */ |
---|
[040387c] | 68 | mgs_cache_memcache, |
---|
[2e12226] | 69 | #endif |
---|
[040387c] | 70 | mgs_cache_unset |
---|
[c301152] | 71 | } mgs_cache_e; |
---|
[2e12226] | 72 | |
---|
[e809fb3] | 73 | /* Internal cache data, defined in gnutls_cache.h */ |
---|
| 74 | typedef struct mgs_cache* mgs_cache_t; |
---|
| 75 | |
---|
[cf2b905] | 76 | typedef enum { |
---|
| 77 | mgs_cvm_unset, |
---|
| 78 | mgs_cvm_cartel, |
---|
| 79 | mgs_cvm_msva |
---|
| 80 | } mgs_client_verification_method_e; |
---|
| 81 | |
---|
| 82 | |
---|
[3b4c0d0] | 83 | /* Directory Configuration Record */ |
---|
| 84 | typedef struct { |
---|
[e924ddd] | 85 | int client_verify_mode; |
---|
[c301152] | 86 | } mgs_dirconf_rec; |
---|
[31645b2] | 87 | |
---|
[7bebb42] | 88 | |
---|
[cc74801e] | 89 | /* Internal per-vhost config for OCSP, defined in gnutls_ocsp.h */ |
---|
| 90 | typedef struct mgs_ocsp_data* mgs_ocsp_data_t; |
---|
| 91 | |
---|
| 92 | |
---|
[3b4c0d0] | 93 | /* The maximum number of certificates to send in a chain */ |
---|
[5e81262] | 94 | #define MAX_CHAIN_SIZE 8 |
---|
[3b4c0d0] | 95 | /* The maximum number of SANs to read from a x509 certificate */ |
---|
| 96 | #define MAX_CERT_SAN 5 |
---|
[7bebb42] | 97 | |
---|
[3b4c0d0] | 98 | /* Server Configuration Record */ |
---|
| 99 | typedef struct { |
---|
[031acac] | 100 | /* --- Configuration values --- */ |
---|
| 101 | /* Is the module enabled? */ |
---|
| 102 | int enabled; |
---|
| 103 | /* Is mod_proxy enabled? */ |
---|
| 104 | int proxy_enabled; |
---|
| 105 | /* A Plain HTTP request */ |
---|
| 106 | int non_ssl_request; |
---|
| 107 | |
---|
[9ca1f21] | 108 | /* List of PKCS #11 provider modules to load, only valid in the |
---|
[87f1ed2] | 109 | * base config, ignored in virtual hosts */ |
---|
[9ca1f21] | 110 | apr_array_header_t *p11_modules; |
---|
[87f1ed2] | 111 | |
---|
[031acac] | 112 | /* PIN used for PKCS #11 operations */ |
---|
| 113 | char *pin; |
---|
| 114 | |
---|
| 115 | /* the SRK PIN used in TPM operations */ |
---|
| 116 | char *srk_pin; |
---|
| 117 | |
---|
| 118 | char *x509_cert_file; |
---|
| 119 | char *x509_key_file; |
---|
| 120 | char *x509_ca_file; |
---|
| 121 | |
---|
| 122 | char *pgp_cert_file; |
---|
| 123 | char *pgp_key_file; |
---|
| 124 | char *pgp_ring_file; |
---|
| 125 | |
---|
| 126 | char *dh_file; |
---|
[7314438] | 127 | |
---|
[031acac] | 128 | char *priorities_str; |
---|
[4133f2d] | 129 | char *proxy_priorities_str; |
---|
[031acac] | 130 | |
---|
| 131 | const char* srp_tpasswd_file; |
---|
| 132 | const char* srp_tpasswd_conf_file; |
---|
| 133 | |
---|
| 134 | /* Cache timeout value */ |
---|
| 135 | int cache_timeout; |
---|
| 136 | /* Chose Cache Type */ |
---|
| 137 | mgs_cache_e cache_type; |
---|
| 138 | const char* cache_config; |
---|
[e809fb3] | 139 | /* Internal cache data */ |
---|
| 140 | mgs_cache_t cache; |
---|
[031acac] | 141 | |
---|
| 142 | /* GnuTLS uses Session Tickets */ |
---|
| 143 | int tickets; |
---|
| 144 | |
---|
| 145 | /* --- Things initialized at _child_init --- */ |
---|
| 146 | |
---|
[0de1839] | 147 | /* x509 Certificate Structure */ |
---|
[671b64f] | 148 | gnutls_certificate_credentials_t certs; |
---|
[0de1839] | 149 | /* x509 credentials for proxy connections */ |
---|
| 150 | gnutls_certificate_credentials_t proxy_x509_creds; |
---|
[bd24203] | 151 | /* trust list for proxy_x509_creds */ |
---|
| 152 | gnutls_x509_trust_list_t proxy_x509_tl; |
---|
[0de1839] | 153 | const char* proxy_x509_key_file; |
---|
| 154 | const char* proxy_x509_cert_file; |
---|
| 155 | const char* proxy_x509_ca_file; |
---|
[809c422] | 156 | const char* proxy_x509_crl_file; |
---|
[f030883] | 157 | /* GnuTLS priorities for proxy connections */ |
---|
| 158 | gnutls_priority_t proxy_priorities; |
---|
[0de1839] | 159 | /* SRP Certificate Structure*/ |
---|
[7bebb42] | 160 | gnutls_srp_server_credentials_t srp_creds; |
---|
[beb14d9] | 161 | /* Anonymous Certificate Structure */ |
---|
[7bebb42] | 162 | gnutls_anon_server_credentials_t anon_creds; |
---|
[beb14d9] | 163 | /* Anonymous Client Certificate Structure, used for proxy |
---|
| 164 | * connections */ |
---|
| 165 | gnutls_anon_client_credentials_t anon_client_creds; |
---|
[3b4c0d0] | 166 | /* Current x509 Certificate CN [Common Name] */ |
---|
[e924ddd] | 167 | char* cert_cn; |
---|
[3b4c0d0] | 168 | /* Current x509 Certificate SAN [Subject Alternate Name]s*/ |
---|
[031acac] | 169 | char* cert_san[MAX_CERT_SAN]; |
---|
| 170 | /* An x509 Certificate Chain */ |
---|
| 171 | gnutls_pcert_st *certs_x509_chain; |
---|
| 172 | gnutls_x509_crt_t *certs_x509_crt_chain; |
---|
| 173 | /* Number of Certificates in Chain */ |
---|
| 174 | unsigned int certs_x509_chain_num; |
---|
| 175 | |
---|
[3b4c0d0] | 176 | /* Current x509 Certificate Private Key */ |
---|
[031acac] | 177 | gnutls_privkey_t privkey_x509; |
---|
| 178 | |
---|
[3b4c0d0] | 179 | /* OpenPGP Certificate */ |
---|
[031acac] | 180 | gnutls_pcert_st *cert_pgp; |
---|
| 181 | gnutls_openpgp_crt_t *cert_crt_pgp; |
---|
| 182 | |
---|
[3b4c0d0] | 183 | /* OpenPGP Certificate Private Key */ |
---|
[031acac] | 184 | gnutls_privkey_t privkey_pgp; |
---|
[d04f7da] | 185 | #if GNUTLS_VERSION_NUMBER < 0x030312 |
---|
| 186 | /* Internal structure for the OpenPGP private key, used in the |
---|
| 187 | * workaround for a bug in gnutls_privkey_import_openpgp_raw that |
---|
| 188 | * frees memory that is still needed. DO NOT USE for any other |
---|
| 189 | * purpose. */ |
---|
[2cde8111] | 190 | gnutls_openpgp_privkey_t privkey_pgp_internal; |
---|
[d04f7da] | 191 | #endif |
---|
[031acac] | 192 | |
---|
[7d1ab49] | 193 | /* Export full certificates to CGI environment: */ |
---|
[2aaf4f5] | 194 | int export_certificates_size; |
---|
[3b4c0d0] | 195 | /* GnuTLS Priorities */ |
---|
[7bebb42] | 196 | gnutls_priority_t priorities; |
---|
[3b4c0d0] | 197 | /* GnuTLS DH Parameters */ |
---|
[a3c97d1] | 198 | gnutls_dh_params_t dh_params; |
---|
[3b4c0d0] | 199 | /* A list of CA Certificates */ |
---|
[8663ace] | 200 | gnutls_x509_crt_t *ca_list; |
---|
[3b4c0d0] | 201 | /* OpenPGP Key Ring */ |
---|
[e5bbda4] | 202 | gnutls_openpgp_keyring_t pgp_list; |
---|
[3b4c0d0] | 203 | /* CA Certificate list size */ |
---|
[7bebb42] | 204 | unsigned int ca_list_size; |
---|
[3b4c0d0] | 205 | /* Client Certificate Verification Mode */ |
---|
[e924ddd] | 206 | int client_verify_mode; |
---|
[cf2b905] | 207 | /* Client Certificate Verification Method */ |
---|
| 208 | mgs_client_verification_method_e client_verify_method; |
---|
[3b4c0d0] | 209 | /* Last Cache timestamp */ |
---|
[f10ab4f] | 210 | apr_time_t last_cache_check; |
---|
[94cb972] | 211 | |
---|
[3475e62] | 212 | /* Enable OCSP stapling */ |
---|
[4d4a406] | 213 | unsigned char ocsp_staple; |
---|
[b888e8b] | 214 | /* Check nonce in OCSP responses? */ |
---|
| 215 | unsigned char ocsp_check_nonce; |
---|
[3475e62] | 216 | /* Read OCSP response for stapling from this file instead of |
---|
| 217 | * sending a request over HTTP */ |
---|
[94cb972] | 218 | char *ocsp_response_file; |
---|
[c6dda6d] | 219 | /* Internal OCSP data for this server */ |
---|
[cc74801e] | 220 | mgs_ocsp_data_t ocsp; |
---|
[d6834e0] | 221 | /* Mutex to prevent parallel OCSP requests */ |
---|
| 222 | apr_global_mutex_t *ocsp_mutex; |
---|
[e1c094c] | 223 | /* Cache timeout for OCSP responses. Note that the nextUpdate |
---|
| 224 | * field of the response takes precedence if shorter. */ |
---|
| 225 | apr_interval_time_t ocsp_cache_time; |
---|
[c6dda6d] | 226 | /* If an OCSP request fails wait this long before trying again. */ |
---|
[0a02378] | 227 | apr_interval_time_t ocsp_failure_timeout; |
---|
[333bbc7] | 228 | /* Socket timeout for OCSP requests */ |
---|
| 229 | apr_interval_time_t ocsp_socket_timeout; |
---|
[c301152] | 230 | } mgs_srvconf_rec; |
---|
[7e2b223] | 231 | |
---|
[3b4c0d0] | 232 | /* Character Buffer */ |
---|
[dae0aec] | 233 | typedef struct { |
---|
| 234 | int length; |
---|
| 235 | char *value; |
---|
[c301152] | 236 | } mgs_char_buffer_t; |
---|
[dae0aec] | 237 | |
---|
[3b4c0d0] | 238 | /* GnuTLS Handle */ |
---|
| 239 | typedef struct { |
---|
| 240 | /* Server configuration record */ |
---|
[c301152] | 241 | mgs_srvconf_rec *sc; |
---|
[3b4c0d0] | 242 | /* Connection record */ |
---|
[dae0aec] | 243 | conn_rec* c; |
---|
[e8acf05] | 244 | /* Is TLS enabled for this connection? */ |
---|
| 245 | int enabled; |
---|
[c1ef069] | 246 | /* Is this a proxy connection? */ |
---|
| 247 | int is_proxy; |
---|
[3b4c0d0] | 248 | /* GnuTLS Session handle */ |
---|
[7e2b223] | 249 | gnutls_session_t session; |
---|
[3b4c0d0] | 250 | /* module input status */ |
---|
[dae0aec] | 251 | apr_status_t input_rc; |
---|
[3b4c0d0] | 252 | /* Input filter */ |
---|
[7e2b223] | 253 | ap_filter_t *input_filter; |
---|
[3b4c0d0] | 254 | /* Input Bucket Brigade */ |
---|
[7e2b223] | 255 | apr_bucket_brigade *input_bb; |
---|
[3b4c0d0] | 256 | /* Input Read Type */ |
---|
[7e2b223] | 257 | apr_read_type_e input_block; |
---|
[3b4c0d0] | 258 | /* Input Mode */ |
---|
[dae0aec] | 259 | ap_input_mode_t input_mode; |
---|
[3b4c0d0] | 260 | /* Input Character Buffer */ |
---|
[c301152] | 261 | mgs_char_buffer_t input_cbuf; |
---|
[3b4c0d0] | 262 | /* Input Character Array */ |
---|
[dae0aec] | 263 | char input_buffer[AP_IOBUFSIZE]; |
---|
[3b4c0d0] | 264 | /* module Output status */ |
---|
[dae0aec] | 265 | apr_status_t output_rc; |
---|
[3b4c0d0] | 266 | /* Output filter */ |
---|
[dae0aec] | 267 | ap_filter_t *output_filter; |
---|
[3b4c0d0] | 268 | /* Output Bucket Brigade */ |
---|
[dae0aec] | 269 | apr_bucket_brigade *output_bb; |
---|
[3b4c0d0] | 270 | /* Output character array */ |
---|
[dae0aec] | 271 | char output_buffer[AP_IOBUFSIZE]; |
---|
[3b4c0d0] | 272 | /* Output buffer length */ |
---|
[dae0aec] | 273 | apr_size_t output_blen; |
---|
[3b4c0d0] | 274 | /* Output length */ |
---|
[dae0aec] | 275 | apr_size_t output_length; |
---|
[3b4c0d0] | 276 | /* General Status */ |
---|
[7e2b223] | 277 | int status; |
---|
[c301152] | 278 | } mgs_handle_t; |
---|
[7e2b223] | 279 | |
---|
[3b4c0d0] | 280 | |
---|
| 281 | |
---|
[7e2b223] | 282 | /** Functions in gnutls_io.c **/ |
---|
| 283 | |
---|
[fb26be5] | 284 | /* apr_signal_block() for blocking SIGPIPE */ |
---|
| 285 | apr_status_t apr_signal_block(int signum); |
---|
| 286 | |
---|
[33826c5] | 287 | /* Proxy Support */ |
---|
[37f8282] | 288 | /* An optional function which returns non-zero if the given connection |
---|
| 289 | is using SSL/TLS. */ |
---|
| 290 | APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *)); |
---|
| 291 | /* The ssl_proxy_enable() and ssl_engine_disable() optional functions |
---|
| 292 | * are used by mod_proxy to enable use of SSL for outgoing |
---|
| 293 | * connections. */ |
---|
| 294 | APR_DECLARE_OPTIONAL_FN(int, ssl_proxy_enable, (conn_rec *)); |
---|
| 295 | APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *)); |
---|
| 296 | int ssl_is_https(conn_rec *c); |
---|
[33826c5] | 297 | int ssl_proxy_enable(conn_rec *c); |
---|
| 298 | int ssl_engine_disable(conn_rec *c); |
---|
[37f8282] | 299 | const char *mgs_set_proxy_engine(cmd_parms * parms, void *dummy, |
---|
[176047e] | 300 | const int arg); |
---|
[37f8282] | 301 | apr_status_t mgs_cleanup_pre_config(void *data); |
---|
[33826c5] | 302 | |
---|
[7e2b223] | 303 | /** |
---|
[c301152] | 304 | * mgs_filter_input will filter the input data |
---|
[7e2b223] | 305 | * by decrypting it using GnuTLS and passes it cleartext. |
---|
| 306 | * |
---|
| 307 | * @param f the filter info record |
---|
| 308 | * @param bb the bucket brigade, where to store the result to |
---|
| 309 | * @param mode what shall we read? |
---|
| 310 | * @param block a block index we shall read from? |
---|
| 311 | * @return result status |
---|
| 312 | */ |
---|
[c301152] | 313 | apr_status_t mgs_filter_input(ap_filter_t * f, |
---|
[2e12226] | 314 | apr_bucket_brigade * bb, |
---|
| 315 | ap_input_mode_t mode, |
---|
| 316 | apr_read_type_e block, |
---|
| 317 | apr_off_t readbytes); |
---|
[7e2b223] | 318 | |
---|
| 319 | /** |
---|
[c301152] | 320 | * mgs_filter_output will filter the encrypt |
---|
[7e2b223] | 321 | * the incoming bucket using GnuTLS and passes it onto the next filter. |
---|
| 322 | * |
---|
| 323 | * @param f the filter info record |
---|
| 324 | * @param bb the bucket brigade, where to store the result to |
---|
| 325 | * @return result status |
---|
| 326 | */ |
---|
[c301152] | 327 | apr_status_t mgs_filter_output(ap_filter_t * f, |
---|
[2e12226] | 328 | apr_bucket_brigade * bb); |
---|
[7e2b223] | 329 | |
---|
| 330 | |
---|
| 331 | /** |
---|
[671b64f] | 332 | * mgs_transport_read is called from GnuTLS to provide encrypted |
---|
[7e2b223] | 333 | * data from the client. |
---|
| 334 | * |
---|
| 335 | * @param ptr pointer to the filter context |
---|
| 336 | * @param buffer place to put data |
---|
| 337 | * @param len maximum size |
---|
| 338 | * @return size length of the data stored in buffer |
---|
| 339 | */ |
---|
[c301152] | 340 | ssize_t mgs_transport_read(gnutls_transport_ptr_t ptr, |
---|
[2e12226] | 341 | void *buffer, size_t len); |
---|
[7e2b223] | 342 | |
---|
| 343 | /** |
---|
[671b64f] | 344 | * mgs_transport_write is called from GnuTLS to |
---|
[7e2b223] | 345 | * write data to the client. |
---|
| 346 | * |
---|
| 347 | * @param ptr pointer to the filter context |
---|
| 348 | * @param buffer buffer to write to the client |
---|
| 349 | * @param len size of the buffer |
---|
| 350 | * @return size length of the data written |
---|
| 351 | */ |
---|
[c301152] | 352 | ssize_t mgs_transport_write(gnutls_transport_ptr_t ptr, |
---|
[2e12226] | 353 | const void *buffer, size_t len); |
---|
[7e2b223] | 354 | |
---|
| 355 | |
---|
[c301152] | 356 | int mgs_rehandshake(mgs_handle_t * ctxt); |
---|
[e924ddd] | 357 | |
---|
| 358 | |
---|
| 359 | |
---|
[a66e147] | 360 | /** |
---|
[031acac] | 361 | * Perform any reinitialization required in PKCS #11 |
---|
| 362 | */ |
---|
| 363 | int mgs_pkcs11_reinit(server_rec * s); |
---|
| 364 | |
---|
[7bebb42] | 365 | |
---|
[c301152] | 366 | |
---|
[46b85d8] | 367 | /* Configuration Functions */ |
---|
| 368 | |
---|
[031acac] | 369 | /* Loads all files set in the configuration */ |
---|
[eee1432] | 370 | int mgs_load_files(apr_pool_t *pconf, apr_pool_t *ptemp, server_rec *s) |
---|
| 371 | __attribute__((nonnull)); |
---|
[031acac] | 372 | |
---|
[7bebb42] | 373 | const char *mgs_set_srp_tpasswd_conf_file(cmd_parms * parms, void *dummy, |
---|
| 374 | const char *arg); |
---|
| 375 | const char *mgs_set_srp_tpasswd_file(cmd_parms * parms, void *dummy, |
---|
| 376 | const char *arg); |
---|
| 377 | const char *mgs_set_dh_file(cmd_parms * parms, void *dummy, |
---|
| 378 | const char *arg); |
---|
[46b85d8] | 379 | const char *mgs_set_cert_file(cmd_parms * parms, void *dummy, |
---|
| 380 | const char *arg); |
---|
| 381 | |
---|
| 382 | const char *mgs_set_key_file(cmd_parms * parms, void *dummy, |
---|
| 383 | const char *arg); |
---|
| 384 | |
---|
[e5bbda4] | 385 | const char *mgs_set_pgpcert_file(cmd_parms * parms, void *dummy, |
---|
| 386 | const char *arg); |
---|
| 387 | |
---|
| 388 | const char *mgs_set_pgpkey_file(cmd_parms * parms, void *dummy, |
---|
| 389 | const char *arg); |
---|
| 390 | |
---|
[46b85d8] | 391 | const char *mgs_set_cache(cmd_parms * parms, void *dummy, |
---|
| 392 | const char *type, const char* arg); |
---|
| 393 | |
---|
[70a1e5a] | 394 | const char *mgs_set_timeout(cmd_parms *parms, void *dummy, const char *arg); |
---|
[46b85d8] | 395 | |
---|
| 396 | const char *mgs_set_client_verify(cmd_parms * parms, void *dummy, |
---|
| 397 | const char *arg); |
---|
| 398 | |
---|
[cf2b905] | 399 | const char *mgs_set_client_verify_method(cmd_parms * parms, void *dummy, |
---|
| 400 | const char *arg); |
---|
| 401 | |
---|
[46b85d8] | 402 | const char *mgs_set_client_ca_file(cmd_parms * parms, void *dummy, |
---|
| 403 | const char *arg); |
---|
[87f1ed2] | 404 | |
---|
| 405 | const char *mgs_set_p11_module(cmd_parms * parms, void *dummy, |
---|
| 406 | const char *arg); |
---|
| 407 | |
---|
[031acac] | 408 | const char *mgs_set_pin(cmd_parms * parms, void *dummy, |
---|
| 409 | const char *arg); |
---|
| 410 | |
---|
| 411 | const char *mgs_set_srk_pin(cmd_parms * parms, void *dummy, |
---|
| 412 | const char *arg); |
---|
[46b85d8] | 413 | |
---|
[e5bbda4] | 414 | const char *mgs_set_keyring_file(cmd_parms * parms, void *dummy, |
---|
| 415 | const char *arg); |
---|
| 416 | |
---|
[46b85d8] | 417 | const char *mgs_set_enabled(cmd_parms * parms, void *dummy, |
---|
[176047e] | 418 | const int arg); |
---|
[2aaf4f5] | 419 | const char *mgs_set_export_certificates_size(cmd_parms * parms, void *dummy, |
---|
[7bebb42] | 420 | const char *arg); |
---|
| 421 | const char *mgs_set_priorities(cmd_parms * parms, void *dummy, |
---|
| 422 | const char *arg); |
---|
[ae233c2] | 423 | const char *mgs_set_tickets(cmd_parms * parms, void *dummy, |
---|
[176047e] | 424 | const int arg); |
---|
[671b64f] | 425 | |
---|
[46b85d8] | 426 | void *mgs_config_server_create(apr_pool_t * p, server_rec * s); |
---|
[040387c] | 427 | void *mgs_config_server_merge(apr_pool_t *p, void *BASE, void *ADD); |
---|
[46b85d8] | 428 | |
---|
[84cb5b2] | 429 | void *mgs_config_dir_merge(apr_pool_t *p, void *basev, void *addv); |
---|
| 430 | |
---|
[46b85d8] | 431 | void *mgs_config_dir_create(apr_pool_t *p, char *dir); |
---|
| 432 | |
---|
[836417f] | 433 | mgs_srvconf_rec* mgs_find_sni_server(gnutls_session_t session); |
---|
[c301152] | 434 | |
---|
[0de1839] | 435 | const char *mgs_store_cred_path(cmd_parms * parms, |
---|
| 436 | void *dummy __attribute__((unused)), |
---|
| 437 | const char *arg); |
---|
| 438 | |
---|
[c301152] | 439 | /* mod_gnutls Hooks. */ |
---|
| 440 | |
---|
| 441 | int mgs_hook_pre_config(apr_pool_t * pconf, |
---|
| 442 | apr_pool_t * plog, apr_pool_t * ptemp); |
---|
| 443 | |
---|
[64856fd] | 444 | int mgs_hook_post_config(apr_pool_t *pconf, |
---|
| 445 | apr_pool_t *plog, |
---|
| 446 | apr_pool_t *ptemp, |
---|
| 447 | server_rec *base_server); |
---|
[c301152] | 448 | |
---|
| 449 | void mgs_hook_child_init(apr_pool_t *p, server_rec *s); |
---|
| 450 | |
---|
| 451 | const char *mgs_hook_http_scheme(const request_rec * r); |
---|
| 452 | |
---|
| 453 | apr_port_t mgs_hook_default_port(const request_rec * r); |
---|
| 454 | |
---|
| 455 | int mgs_hook_pre_connection(conn_rec * c, void *csd); |
---|
| 456 | |
---|
| 457 | int mgs_hook_fixups(request_rec *r); |
---|
| 458 | |
---|
| 459 | int mgs_hook_authz(request_rec *r); |
---|
| 460 | |
---|
[7e2b223] | 461 | #endif /* __mod_gnutls_h_inc */ |
---|