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