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