Changeset e183628 in mod_gnutls for src/mod_gnutls.c


Ignore:
Timestamp:
Sep 19, 2011, 11:58:43 PM (8 years ago)
Author:
Dash Shendy <neuromancer@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
c7c2ad2
Parents:
6223319
Message:

Updated Copyright Headers & Formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mod_gnutls.c

    r6223319 re183628  
    11/**
    22 *  Copyright 2004-2005 Paul Querna
     3 *  Copyright 2008 Nikos Mavrogiannopoulos
     4 *  Copyright 2011 Dash Shendy
    35 *
    46 *  Licensed under the Apache License, Version 2.0 (the "License");
     
    1820#include "mod_gnutls.h"
    1921
    20 static void gnutls_hooks(apr_pool_t * p)
    21 {
    22         ap_hook_pre_connection(mgs_hook_pre_connection, NULL, NULL,
    23                                APR_HOOK_MIDDLE);
    24         ap_hook_post_config(mgs_hook_post_config, NULL, NULL,
    25                             APR_HOOK_MIDDLE);
    26         ap_hook_child_init(mgs_hook_child_init, NULL, NULL,
    27                            APR_HOOK_MIDDLE);
     22static void gnutls_hooks(apr_pool_t * p) {
     23    ap_hook_pre_connection(mgs_hook_pre_connection, NULL, NULL,
     24            APR_HOOK_MIDDLE);
     25    ap_hook_post_config(mgs_hook_post_config, NULL, NULL,
     26            APR_HOOK_MIDDLE);
     27    ap_hook_child_init(mgs_hook_child_init, NULL, NULL,
     28            APR_HOOK_MIDDLE);
    2829#if USING_2_1_RECENT
    29         ap_hook_http_scheme(mgs_hook_http_scheme, NULL, NULL,
    30                             APR_HOOK_MIDDLE);
     30    ap_hook_http_scheme(mgs_hook_http_scheme, NULL, NULL,
     31            APR_HOOK_MIDDLE);
    3132#else
    32         ap_hook_http_method(mgs_hook_http_scheme, NULL, NULL,
    33                             APR_HOOK_MIDDLE);
     33    ap_hook_http_method(mgs_hook_http_scheme, NULL, NULL,
     34            APR_HOOK_MIDDLE);
    3435#endif
    35         ap_hook_default_port(mgs_hook_default_port, NULL, NULL,
    36                              APR_HOOK_MIDDLE);
    37         ap_hook_pre_config(mgs_hook_pre_config, NULL, NULL,
    38                            APR_HOOK_MIDDLE);
     36    ap_hook_default_port(mgs_hook_default_port, NULL, NULL,
     37            APR_HOOK_MIDDLE);
     38    ap_hook_pre_config(mgs_hook_pre_config, NULL, NULL,
     39            APR_HOOK_MIDDLE);
    3940
    40         ap_hook_access_checker(mgs_hook_authz, NULL, NULL,
    41                                APR_HOOK_REALLY_FIRST);
     41    ap_hook_access_checker(mgs_hook_authz, NULL, NULL,
     42            APR_HOOK_REALLY_FIRST);
    4243
    43         ap_hook_fixups(mgs_hook_fixups, NULL, NULL, APR_HOOK_REALLY_FIRST);
     44    ap_hook_fixups(mgs_hook_fixups, NULL, NULL, APR_HOOK_REALLY_FIRST);
    4445
    45         /* TODO: HTTP Upgrade Filter */
    46         /* ap_register_output_filter ("UPGRADE_FILTER",
    47         *          ssl_io_filter_Upgrade, NULL, AP_FTYPE_PROTOCOL + 5);
    48         */
     46    /* TODO: HTTP Upgrade Filter */
     47    /* ap_register_output_filter ("UPGRADE_FILTER",
     48    *          ssl_io_filter_Upgrade, NULL, AP_FTYPE_PROTOCOL + 5);
     49    */
    4950
    50         ap_register_input_filter(GNUTLS_INPUT_FILTER_NAME,
    51                                 mgs_filter_input, NULL,
    52                                 AP_FTYPE_CONNECTION + 5);
    53         ap_register_output_filter(GNUTLS_OUTPUT_FILTER_NAME,
    54                                   mgs_filter_output, NULL,
    55                                   AP_FTYPE_CONNECTION + 5);
     51    ap_register_input_filter(GNUTLS_INPUT_FILTER_NAME,
     52            mgs_filter_input, NULL,
     53            AP_FTYPE_CONNECTION + 5);
     54    ap_register_output_filter(GNUTLS_OUTPUT_FILTER_NAME,
     55            mgs_filter_output, NULL,
     56            AP_FTYPE_CONNECTION + 5);
    5657}
    5758
    5859static const command_rec mgs_config_cmds[] = {
    59         AP_INIT_TAKE1("GnuTLSClientVerify", mgs_set_client_verify,
    60                       NULL,
    61                       RSRC_CONF | OR_AUTHCFG,
    62                       "Set Verification Requirements of the Client Certificate"),
    63         AP_INIT_TAKE1("GnuTLSClientCAFile", mgs_set_client_ca_file,
    64                       NULL,
    65                       RSRC_CONF,
    66                       "Set the CA File to verify Client Certificates"),
    67         AP_INIT_TAKE1("GnuTLSX509CAFile", mgs_set_client_ca_file,
    68                       NULL,
    69                       RSRC_CONF,
    70                       "Set the CA File to verify Client Certificates"),
    71         AP_INIT_TAKE1("GnuTLSPGPKeyringFile", mgs_set_keyring_file,
    72                       NULL,
    73                       RSRC_CONF,
    74                       "Set the Keyring File to verify Client Certificates"),
    75         AP_INIT_TAKE1("GnuTLSDHFile", mgs_set_dh_file,
    76                       NULL,
    77                       RSRC_CONF,
    78                       "Set the file to read Diffie Hellman parameters from"),
    79         AP_INIT_TAKE1("GnuTLSRSAFile", mgs_set_rsa_export_file,
    80                       NULL,
    81                       RSRC_CONF,
    82                       "Set the file to read RSA-EXPORT parameters from"),
    83         AP_INIT_TAKE1("GnuTLSCertificateFile", mgs_set_cert_file,
    84                       NULL,
    85                       RSRC_CONF,
    86                       "SSL Server X509 Certificate file"),
    87         AP_INIT_TAKE1("GnuTLSKeyFile", mgs_set_key_file,
    88                       NULL,
    89                       RSRC_CONF,
    90                       "SSL Server X509 Private Key file"),
    91         AP_INIT_TAKE1("GnuTLSX509CertificateFile", mgs_set_cert_file,
    92                       NULL,
    93                       RSRC_CONF,
    94                       "SSL Server X509 Certificate file"),
    95         AP_INIT_TAKE1("GnuTLSX509KeyFile", mgs_set_key_file,
    96                       NULL,
    97                       RSRC_CONF,
    98                       "SSL Server X509 Private Key file"),
    99         AP_INIT_TAKE1("GnuTLSPGPCertificateFile", mgs_set_pgpcert_file,
    100                       NULL,
    101                       RSRC_CONF,
    102                       "SSL Server PGP Certificate file"),
    103         AP_INIT_TAKE1("GnuTLSPGPKeyFile", mgs_set_pgpkey_file,
    104                       NULL,
    105                       RSRC_CONF,
    106                       "SSL Server PGP Private key file"),
     60    AP_INIT_TAKE1("GnuTLSClientVerify", mgs_set_client_verify,
     61    NULL,
     62    RSRC_CONF | OR_AUTHCFG,
     63    "Set Verification Requirements of the Client Certificate"),
     64    AP_INIT_TAKE1("GnuTLSClientCAFile", mgs_set_client_ca_file,
     65    NULL,
     66    RSRC_CONF,
     67    "Set the CA File to verify Client Certificates"),
     68    AP_INIT_TAKE1("GnuTLSX509CAFile", mgs_set_client_ca_file,
     69    NULL,
     70    RSRC_CONF,
     71    "Set the CA File to verify Client Certificates"),
     72    AP_INIT_TAKE1("GnuTLSPGPKeyringFile", mgs_set_keyring_file,
     73    NULL,
     74    RSRC_CONF,
     75    "Set the Keyring File to verify Client Certificates"),
     76    AP_INIT_TAKE1("GnuTLSDHFile", mgs_set_dh_file,
     77    NULL,
     78    RSRC_CONF,
     79    "Set the file to read Diffie Hellman parameters from"),
     80    AP_INIT_TAKE1("GnuTLSRSAFile", mgs_set_rsa_export_file,
     81    NULL,
     82    RSRC_CONF,
     83    "Set the file to read RSA-EXPORT parameters from"),
     84    AP_INIT_TAKE1("GnuTLSCertificateFile", mgs_set_cert_file,
     85    NULL,
     86    RSRC_CONF,
     87    "SSL Server X509 Certificate file"),
     88    AP_INIT_TAKE1("GnuTLSKeyFile", mgs_set_key_file,
     89    NULL,
     90    RSRC_CONF,
     91    "SSL Server X509 Private Key file"),
     92    AP_INIT_TAKE1("GnuTLSX509CertificateFile", mgs_set_cert_file,
     93    NULL,
     94    RSRC_CONF,
     95    "SSL Server X509 Certificate file"),
     96    AP_INIT_TAKE1("GnuTLSX509KeyFile", mgs_set_key_file,
     97    NULL,
     98    RSRC_CONF,
     99    "SSL Server X509 Private Key file"),
     100    AP_INIT_TAKE1("GnuTLSPGPCertificateFile", mgs_set_pgpcert_file,
     101    NULL,
     102    RSRC_CONF,
     103    "SSL Server PGP Certificate file"),
     104    AP_INIT_TAKE1("GnuTLSPGPKeyFile", mgs_set_pgpkey_file,
     105    NULL,
     106    RSRC_CONF,
     107    "SSL Server PGP Private key file"),
    107108#ifdef ENABLE_SRP
    108         AP_INIT_TAKE1("GnuTLSSRPPasswdFile", mgs_set_srp_tpasswd_file,
    109                       NULL,
    110                       RSRC_CONF,
    111                       "SSL Server SRP Password Conf file"),
    112         AP_INIT_TAKE1("GnuTLSSRPPasswdConfFile",
    113                       mgs_set_srp_tpasswd_conf_file,
    114                       NULL,
    115                       RSRC_CONF,
    116                       "SSL Server SRP Parameters file"),
     109    AP_INIT_TAKE1("GnuTLSSRPPasswdFile", mgs_set_srp_tpasswd_file,
     110    NULL,
     111    RSRC_CONF,
     112    "SSL Server SRP Password Conf file"),
     113    AP_INIT_TAKE1("GnuTLSSRPPasswdConfFile",
     114    mgs_set_srp_tpasswd_conf_file,
     115    NULL,
     116    RSRC_CONF,
     117    "SSL Server SRP Parameters file"),
    117118#endif
    118         AP_INIT_TAKE1("GnuTLSCacheTimeout", mgs_set_cache_timeout,
    119                       NULL,
    120                       RSRC_CONF,
    121                       "Cache Timeout"),
    122         AP_INIT_TAKE12("GnuTLSCache", mgs_set_cache,
    123                       NULL,
    124                       RSRC_CONF,
    125                       "Cache Configuration"),
    126         AP_INIT_TAKE1("GnuTLSSessionTickets", mgs_set_tickets,
    127                       NULL,
    128                       RSRC_CONF,
    129                       "Session Tickets Configuration"),
    130         AP_INIT_RAW_ARGS("GnuTLSPriorities", mgs_set_priorities,
    131                         NULL,
    132                         RSRC_CONF,
    133                         "The priorities to enable (ciphers, Key exchange, macs, compression)."),
    134         AP_INIT_TAKE1("GnuTLSEnable", mgs_set_enabled,
    135                       NULL,
    136                       RSRC_CONF,
    137                       "Whether this server has GnuTLS Enabled. Default: Off"),
    138         AP_INIT_TAKE1("GnuTLSExportCertificates",
    139                       mgs_set_export_certificates_enabled,
    140                       NULL,
    141                       RSRC_CONF,
    142                       "Whether to export PEM encoded certificates to CGIs. Default: Off"),
    143         {NULL}
     119    AP_INIT_TAKE1("GnuTLSCacheTimeout", mgs_set_cache_timeout,
     120    NULL,
     121    RSRC_CONF,
     122    "Cache Timeout"),
     123    AP_INIT_TAKE12("GnuTLSCache", mgs_set_cache,
     124    NULL,
     125    RSRC_CONF,
     126    "Cache Configuration"),
     127    AP_INIT_TAKE1("GnuTLSSessionTickets", mgs_set_tickets,
     128    NULL,
     129    RSRC_CONF,
     130    "Session Tickets Configuration"),
     131    AP_INIT_RAW_ARGS("GnuTLSPriorities", mgs_set_priorities,
     132    NULL,
     133    RSRC_CONF,
     134    "The priorities to enable (ciphers, Key exchange, macs, compression)."),
     135    AP_INIT_TAKE1("GnuTLSEnable", mgs_set_enabled,
     136    NULL,
     137    RSRC_CONF,
     138    "Whether this server has GnuTLS Enabled. Default: Off"),
     139    AP_INIT_TAKE1("GnuTLSExportCertificates",
     140    mgs_set_export_certificates_enabled,
     141    NULL,
     142    RSRC_CONF,
     143    "Whether to export PEM encoded certificates to CGIs. Default: Off"),
     144    NULL
    144145};
    145146
    146147module AP_MODULE_DECLARE_DATA gnutls_module = {
    147         STANDARD20_MODULE_STUFF,
    148         mgs_config_dir_create,
    149         mgs_config_dir_merge,
    150         mgs_config_server_create,
    151         NULL,
    152         mgs_config_cmds,
    153         gnutls_hooks
     148    STANDARD20_MODULE_STUFF,
     149    mgs_config_dir_create,
     150    mgs_config_dir_merge,
     151    mgs_config_server_create,
     152    NULL,
     153    mgs_config_cmds,
     154    gnutls_hooks
    154155};
Note: See TracChangeset for help on using the changeset viewer.