aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: ad7f9c6f03cbfcc2aed64234d0ff8e62e40f4e58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

                mod_gnutls, Apache GnuTLS module.
                =================================

$LastChangedDate: $

Contents:

     I. ABOUT
    II. AUTHORS
   III. LICENSE
    IV. STATUS
     V. BASIC CONFIGURATION
    VI. CREATE OPENPGP CREDENTIALS FOR THE SERVER



I.    ABOUT

      This module started back in September of 2004 because I was tired of
      trying to fix bugs in mod_ssl.  mod_ssl is a giant beast of a module --
      no offense to it's authors is intended -- but I believe it has fallen
      prey to massive feature bloat.

      When I started hacking on httpd, mod_ssl remained a great mystery to me,
      and when I actually looked at it, I ran away.  The shear amount code is
      huge, and it does not conform to the style guidelines.  It was painful to
      read, and even harder to debug.  I wanted to understand how it worked,
      and I had recently heard about GnuTLS, so long story short, I decided to
      implement a mod_gnutls.

         Lines of Code in mod_ssl: 15,324
         Lines of Code in mod_gnutls: 3,594

      Because of writing mod_gnutls, I now understand how input and output
      filters work, better than I ever thought possible.  It was a little
      painful at times, and some parts lift code and ideas directly from
      mod_ssl.  Kudos to the original authors of mod_ssl.



II.   AUTHORS

      Paul Querna <chip force-elite.com>
      Nikos Mavrogiannopoulos <nmav gnutls.org>



III.  LICENSE

      Apache License, Version 2.0 (see the LICENSE file for details)



IV.   STATUS

      * SSL and TLS connections with all popular browsers work!
      * Sets environmental vars for scripts (compatible with mod_ssl vars)
      * Supports memcached as a distributed SSL session cache
      * Supports DBM as a local SSL session cache
      * Support for server name indication (SNI), RFC3546
      * Support for client certificates
      * Support for secure remote password (SRP), RFC5054



V.    BASIC CONFIGURATION

      LoadModule gnutls_module modules/mod_gnutls.so
      
      # mod_gnutls can optionally use a memcached server to store it's SSL
      # Sessions.  This is useful in a cluster environment, where you want all
      # of your servers to share a single SSL session cache.
      #GnuTLSCache memcache "127.0.0.1 server2.example.com server3.example.com"
      
      # The Default method is to use a DBM backed Cache.  It isn't super fast,
      # but it is portable and does not require another server to be running
      # like memcached.
      GnuTLSCache dbm conf/gnutls_cache
      
      <VirtualHost 1.2.3.4:443>

        # Enable mod_gnutls handlers for this virtual host
        GnuTLSEnable On
      
        # This is the private key for your server
        GnuTLSX509KeyFile conf/server.key
      
        # This is the server certificate
        GnuTLSX509CertificateFile conf/server.cert

      </VirtualHost>
      
      # A more advanced configuration
      GnuTLSCache dbm "/var/cache/www-tls-cache/cache"
      GnuTLSCacheTimeout 600
      NameVirtualHost 1.2.3.4:443
      
      <VirtualHost 1.2.3.4:443>

      	Servername server.com:443
        GnuTLSEnable on
      	GnuTLSPriority NORMAL

	# Export exactly the same environment variables as mod_ssl to CGI
	# scripts.
      	GNUTLSExportCertificates on
      
      	GnuTLSX509CertificateFile /etc/apache2/server-cert.pem
      	GnuTLSX509KeyFile /etc/apache2/server-key.pem
      
	# To enable SRP you must have these files installed.  Check the gnutls
	# srptool.
      	GnuTLSSRPPasswdFile /etc/apache2/tpasswd
      	GnuTLSSRPPasswdConfFile /etc/apache2/tpasswd.conf
      
	# In order to verify client certificates.  Other options to
	# GnuTLSClientVerify could be ignore or require.  The
	# GnuTLSClientCAFile contains the CAs to verify client certificates.
      	GnuTLSClientVerify request
      	GnuTLSX509CAFile ca.pem

      </VirtualHost>
      
      # A setup for OpenPGP and X.509 authentication
      <VirtualHost 1.2.3.4:443>

      	Servername crystal.lan:443
        GnuTLSEnable on
      	GnuTLSPriorities NORMAL:+COMP-NULL
      
        # Setup the openpgp keys
      	GnuTLSPGPCertificateFile /etc/apache2/test.pub.asc
      	GnuTLSPGPKeyFile /etc/apache2/test.sec.asc
      
        # - and the X.509 keys
      	GnuTLSCertificateFile /etc/apache2/server-cert.pem
      	GnuTLSKeyFile /etc/apache2/server-key.pem

      	GnuTLSClientVerify ignore
      
        # To avoid using the default DH params
      	GnuTLSDHFile /etc/apache2/dh.pem
      
        # These are only needed if GnuTLSClientVerify != ignore
      	GnuTLSClientCAFile ca.pem
      	GnuTLSPGPKeyringFile /etc/apache2/ring.asc

      </VirtualHost>



VI.   CREATE OPENPGP CREDENTIALS FOR THE SERVER

      mod_gnutls currently cannot read encrypted OpenPGP credentials.  That is,
      when you generate a key with gpg and gpg prompts you for a passphrase,
      just press enter.  Then press enter again, to confirm an empty
      passphrase.  http://news.gmane.org/gmane.comp.apache.outoforder.modules

      These instructions are from the GnuTLS manual:
      http://www.gnu.org/software/gnutls/manual/html_node/Invoking-gnutls_002dserv.html#Invoking-gnutls_002dserv

        $ gpg --gen-key
        ...enter whatever details you want, use 'test.gnutls.org' as name...

      Make a note of the OpenPGP key identifier of the newly generated key,
      here it was 5D1D14D8.  You will need to export the key for GnuTLS to be
      able to use it.

         $ gpg -a --export 5D1D14D8 > openpgp-server.txt
         $ gpg -a --export-secret-keys 5D1D14D8 > openpgp-server-key.txt
der'>* updated release date1.96Gravatar Edward Rudd 2004-03-05 | * updated compatability header for Apache 1.3Gravatar Edward Rudd 2004-03-05 | | | | | | | | | Changed log_error routing for Apache 1.3 to include APLOG_NOERRNO re-added quarter second delay between reconnect and query retry. updated makefile to generate HTML version of docbook docs. added comments to mod_log_sql_mysql.c updated documentation about --with-db-inc configure option * complete DB separation from core module code.Gravatar Edward Rudd 2004-03-04 | | | | | | | 99% updated documentation (needs 2 tables added) moved DB connection code for Apache 2 from open_logs to child_init. removed more #ifdef debug lines * separated out most mysql specific code to mod_log_sql_mysql.cGravatar Edward Rudd 2004-02-29 | | | | | | | | | | beginnings of separation of core SQL logging logic moved DB connection paramters to a table (for cutoms params for DB drivers) added new configuration directive to handle any DB parameter renamed all log_sql_* vars and type to logsql_* Added enums for opendb return codes. organized config directives and commented for easier reading of source * Split Changelog and TODO to separate files.Gravatar Edward Rudd 2004-02-12 | * Cleaned up changelogGravatar Edward Rudd 2004-02-12 | * update changelog1.95Gravatar Edward Rudd 2004-02-05 | | | | | release 1.95 * fixed segfaul bug with pointer arithmetic in add_server_string_slotGravatar Edward Rudd 2004-02-04 | | | | | | Added authors file release 1.94 * SSL support working under 1.3 and 2.0 as a separate moduleGravatar Edward Rudd 2004-01-22 | | | | | | preparsing of logformat completed. updated configure scripts to detect mod_ssl.h for 1.3 (mostly) * fixed log_error function1.93Gravatar Edward Rudd 2004-01-21 | | | | | | | finished ssl split into separate module added item registration function. (for ssl sub-module) release 1.93 * moved extract_* functions to functions.h (version specific in ↵Gravatar Edward Rudd 2004-01-20 | | | | | | | | | functions(13|20).h) moves SSL logging routings to mod_log_sql_ssl.c updated changelog added AUTHORS * split out version specific codeGravatar Edward Rudd 2004-01-20 | | | | | | | code compiles under apache 1.3 and 2.0 updated apache m4 script to detect both verions (two minumums) defaulted install to not activate module in configuration file (use make activate) * update m4 filesGravatar Edward Rudd 2004-01-06 | | | | | release 1.92 * update apache.m4 to use -with-apxs instead of --with-apacheGravatar Edward Rudd 2004-01-04 | | | | | | got SSL support to compile. added Documentation subdirectory. * update autoconf scripts to check MySQL..1.91Gravatar Edward Rudd 2003-12-23 | | | | | | | | | moved autoconf DEFUN macros to m4 subdirectory autogen.sh calls aclocal to include m4 directory. merged in changes from 1.19b1 fixed log_sql_merge_config bug in 1.19b1 release 1.91 * compiles and loads under apache2.0Gravatar Edward Rudd 2003-12-22 | | | | | | consolidated configuration functions uses APR_OFFSETOF.. delayed inserts are configurable * Initial revisionGravatar Edward Rudd 2003-12-20 | * Changes on the way to 1.19. This is probably going to be 1.19b1. Detail:1.19b1Gravatar Christopher Powell 2003-07-22 | | | | | | | | | | | | | | | * Hostnames are now converted to lowercase in the mass-virtual naming section. The loop that converts dots to underscores has been optimized as well. * Migration to autoconf * New directive LogSQLTableType allows one to specify the kind of table that the module makes during table creation (e.g. InnoDB, MyISAM). Thanks to Jim Turner for the suggestion and patch. If your MySQL server does not support the specified type, it will create a MyISAM table instead. * Directives can now be placed in the 'main' server config and will be inherited by the virtual hosts. This means a LOT less repetition: you only specify the item once to have it inherited, but it can still be overridden on a virtualhost level. * Some minor additions / edits to the docs.Gravatar Christopher Powell 2003-03-27 | * Removed message about insufficient info to log.1.18Gravatar Christopher Powell 2002-12-18 | * Delayed inserts, includes, better table creation, renamed global vars,Gravatar Christopher Powell 2002-12-18 | * Changes on route to 1.18 release (better table creation logic and ↵Gravatar Christopher Powell 2002-12-10 | | | | workarounds for delayed insert kluge). * More documentation work on the way to final 1.17 release.Gravatar Christopher Powell 2002-11-14 | | | | | Additional work on the Makefile. * Monster changes en route to 1.17. Esp. with new documentation.Gravatar Christopher Powell 2002-11-14 | * *** empty log message ***1.17pre2Gravatar Christopher Powell 2002-09-04 | * Lots of changes & bugfixes as requested on the list. Pre-1 of 1.17.1.17pre1Gravatar Christopher Powell 2002-06-27 | * More effort toward next release. Now include headers in/out.Gravatar Christopher Powell 2002-05-24 | * Further changes on the way to 1.17, big one was the segfault fix.Gravatar Christopher Powell 2002-05-16 | * Added notes logging capability. This is a commit prior to a lot of workGravatar Christopher Powell 2002-05-14 | | | | | that will rename mod_log_mysql to mod_log_sql. * Significant headway toward a releasable 1.16, passed ab testing and myGravatar Christopher Powell 2002-04-23 | | | | | own hand tests. Mods documented in CHANGELOG. * Significant bugfixes and feature additions on the way to 1.16...Gravatar Christopher Powell 2002-04-21 | * Added - but did not activate - routines to handle proxy environment variables.Gravatar Christopher Powell 2002-04-08 | * This is a "pre" snapshot of 1.15. Numerous changes emphasizing how SQLGravatar Christopher Powell