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