README revision 2e47fc5cb65457416d3aff3462b865e5e8a97f12
132N/A _ _
132N/A _ __ ___ ___ __| | ___ ___| |
132N/A | '_ ` _ \ / _ \ / _` | / __/ __| |
132N/A | | | | | | (_) | (_| | \__ \__ \ | ``mod_ssl combines the flexibility of
132N/A |_| |_| |_|\___/ \__,_|___|___/___/_| Apache with the security of OpenSSL.''
132N/A |_____|
132N/A mod_ssl ``Ralf Engelschall has released an
132N/A Apache Interface to OpenSSL excellent module that integrates
132N/A http://www.modssl.org/ Apache and SSLeay.''
132N/A Version 2.8 -- Tim J. Hudson
132N/A
132N/A SYNOPSIS
132N/A
132N/A This Apache module provides strong cryptography for the Apache 1.3 webserver
132N/A via the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
132N/A v1) protocols by the help of the SSL/TLS implementation library OpenSSL which
132N/A is based on SSLeay from Eric A. Young and Tim J. Hudson. The mod_ssl package
132N/A was created in April 1998 by Ralf S. Engelschall and was originally derived
132N/A from software developed by Ben Laurie for use in the Apache-SSL HTTP server
132N/A project.
132N/A
132N/A SOURCES
132N/A
132N/A Here is a short overview of the source files:
144N/A
132N/A * README .................. This file ;)
132N/A # Makefile.in ............. Makefile template for Unix platform
132N/A # config.m4 ............... Autoconf stub for the Apache config mechanism
132N/A # mod_ssl.c ............... main source file containing API structures
132N/A # mod_ssl.h ............... common header file of mod_ssl
132N/A # ssl_engine_config.c ..... module configuration handling
132N/A # ssl_engine_dh.c ......... DSA/DH support
132N/A - ssl_engine_ext.c ........ Extensions to other Apache parts
132N/A # ssl_engine_init.c ....... module initialization
132N/A # ssl_engine_io.c ......... I/O support
132N/A # ssl_engine_kernel.c ..... SSL engine kernel
132N/A # ssl_engine_log.c ........ logfile support
132N/A # ssl_engine_mutex.c ...... mutual exclusion support
132N/A # ssl_engine_pphrase.c .... pass-phrase handling
132N/A # ssl_engine_rand.c ....... PRNG support
132N/A # ssl_engine_vars.c ....... Variable Expansion support
132N/A # ssl_expr.c .............. expression handling main source
132N/A # ssl_expr.h .............. expression handling common header
132N/A # ssl_expr_scan.c ......... expression scanner automaton (pre-generated)
132N/A # ssl_expr_scan.l ......... expression scanner source
132N/A # ssl_expr_parse.c ........ expression parser automaton (pre-generated)
132N/A # ssl_expr_parse.h ........ expression parser header (pre-generated)
132N/A # ssl_expr_parse.y ........ expression parser source
132N/A # ssl_expr_eval.c ......... expression machine evaluation
132N/A # ssl_scache.c ............ session cache abstraction layer
132N/A # ssl_scache_dbm.c ........ session cache via DBM file
132N/A ~ ssl_scache_shmcb.c ...... session cache via shared memory cyclic buffer
132N/A ~ ssl_scache_shmht.c ...... session cache via shared memory hash table
132N/A # ssl_util.c .............. utility functions
132N/A # ssl_util_ssl.c .......... the OpenSSL companion source
132N/A # ssl_util_ssl.h .......... the OpenSSL companion header
132N/A # ssl_util_table.c ........ the hash table library source
132N/A # ssl_util_table.h ........ the hash table library header
132N/A
132N/A Legend: # = already ported to Apache 2.0 and is cleaned up
132N/A * = ported to Apache 2.0 but still needs cleaning up
132N/A ~ = ported to Apache 2.0 but still needs work
132N/A - = port still not finished
132N/A
132N/A The source files are written in clean ANSI C and pass the ``gcc -O -g
132N/A -ggdb3 -Wall -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes
132N/A -Wmissing-declarations -Wnested-externs -Winline'' compiler test
132N/A (assuming `gcc' is GCC 2.95.2 or newer) without any complains. When
132N/A you make changes or additions make sure the source still passes this
132N/A compiler test.
132N/A
132N/A FUNCTIONS
132N/A
132N/A Inside the source code you will be confronted with the following types of
132N/A functions which can be identified by their prefixes:
132N/A
132N/A ap_xxxx() ............... Apache API function
132N/A ssl_xxxx() .............. mod_ssl function
132N/A SSL_xxxx() .............. OpenSSL function (SSL library)
132N/A OpenSSL_xxxx() .......... OpenSSL function (SSL library)
132N/A X509_xxxx() ............. OpenSSL function (Crypto library)
132N/A PEM_xxxx() .............. OpenSSL function (Crypto library)
132N/A EVP_xxxx() .............. OpenSSL function (Crypto library)
132N/A RSA_xxxx() .............. OpenSSL function (Crypto library)
132N/A
132N/A DATA STRUCTURES
132N/A
132N/A Inside the source code you will be confronted with the following
132N/A data structures:
132N/A
132N/A server_rec .............. Apache (Virtual) Server
132N/A conn_rec ................ Apache Connection
132N/A request_rec ............. Apache Request
132N/A SSLModConfig ............ mod_ssl (Global) Module Configuration
132N/A SSLSrvConfig ............ mod_ssl (Virtual) Server Configuration
132N/A SSLDirConfig ............ mod_ssl Directory Configuration
132N/A SSLConnConfig ........... mod_ssl Connection Configuration
132N/A SSLFilterRec ............ mod_ssl Filter Context
132N/A SSL_CTX ................. OpenSSL Context
132N/A SSL_METHOD .............. OpenSSL Protocol Method
132N/A SSL_CIPHER .............. OpenSSL Cipher
132N/A SSL_SESSION ............. OpenSSL Session
132N/A SSL ..................... OpenSSL Connection
132N/A BIO ..................... OpenSSL Connection Buffer
132N/A
132N/A For an overview how these are related and chained together have a look at the
132N/A page in README.dsov.{fig,ps}. It contains overview diagrams for those data
132N/A structures. It's designed for DIN A4 paper size, but you can easily generate
132N/A a smaller version inside XFig by specifing a magnification on the Export
132N/A panel.
132N/A
132N/A EXPERIMENTAL CODE
132N/A
132N/A Experimental code is always encapsulated as following:
132N/A
132N/A | #ifdef SSL_EXPERIMENTAL_xxxx
132N/A | ...
132N/A | #endif
144N/A
144N/A This way it is only compiled in when this define is enabled with
144N/A the APACI --enable-rule=SSL_EXPERIMENTAL option and as long as the
144N/A C pre-processor variable SSL_EXPERIMENTAL_xxxx_IGNORE is _NOT_
144N/A defined (via CFLAGS). Or in other words: SSL_EXPERIMENTAL enables all
144N/A SSL_EXPERIMENTAL_xxxx variables, except if SSL_EXPERIMENTAL_xxxx_IGNORE
144N/A is already defined. Currently the following features are experimental:
144N/A
132N/A o SSL_EXPERIMENTAL_PROXY
The ability to use various additional SSLProxyXXX directives in
oder to control extended client functionality in the HTTPS proxy
code.
o SSL_EXPERIMENTAL_ENGINE
The ability to support the new forthcoming OpenSSL ENGINE stuff.
Until this development branch of OpenSSL is merged into the main
stream, you have to use openssl-engine-0.9.x.tar.gz for this.
mod_ssl automatically recognizes this OpenSSL variant and then can
activate external crypto devices through SSLCryptoDevice directive.
INCOMPATIBILITIES
The following intentional incompatibilities exist between mod_ssl 2.x
from Apache 1.3 and this mod_ssl version for Apache 2.0:
o The complete EAPI-based SSL_VENDOR stuff was removed.
o The complete EAPI-based SSL_COMPAT stuff was removed.
o The <IfDefine> variable MOD_SSL is no longer provided automatically
o The complete SSL_CONSERVATIVE stuff was removed, i.e.,
SSL renegotiations in combination with POST request are not supported
unless the problem is solved again, but this time through layered I/O.
MAJOR CHANGES
The following major changes were made between mod_ssl 2.x
from Apache 1.3 and this mod_ssl version for Apache 2.0:
o The DBM based session cache is now based on APR's DBM API only.
o Introduced Filter logic (similar to mod_tls)
o Eliminated ap_global_ctx. Storing Persistant information in
process_rec->pool->user_data. The ssl_pphrase_Handle_CB() and
ssl_config_global_* () functions have an extra parameter now -
"server_rec *" - which is used to retrieve the SSLModConfigRec.
o Properly support restarts, allowing mod_ssl to be added to a server
that is already running and to change server certs/keys on restart
o Various performance enhancements
TODO
o Port all remaining code (code inside #if 0...#endif blocks)
o Do we need SSL_set_read_ahead()?
o Enable SSL extensions (ssl_engine_ext.c)
o add configure check for SSL_set_cert_store to support per-dir
SSLCACertificate{File,Path}
o the ssl_expr api is NOT THREAD SAFE. race conditions exist:
-in ssl_expr_comp() if SSLRequire is used in .htaccess
(ssl_expr_info is global)
-is ssl_expr_eval() if there is an error
(ssl_expr_error is global)
o SSLRequire directive (parsing of) leaks memory