Blame SOURCES/ssl.conf

28b219
#
28b219
# When we also provide SSL we have to listen to the 
28b219
# the HTTPS port in addition.
28b219
#
28b219
Listen 443 https
28b219
28b219
##
28b219
##  SSL Global Context
28b219
##
28b219
##  All SSL configuration in this context applies both to
28b219
##  the main server and all SSL-enabled virtual hosts.
28b219
##
28b219
28b219
#   Pass Phrase Dialog:
28b219
#   Configure the pass phrase gathering process.
28b219
#   The filtering dialog program (`builtin' is a internal
28b219
#   terminal dialog) has to provide the pass phrase on stdout.
28b219
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
28b219
28b219
#   Inter-Process Session Cache:
28b219
#   Configure the SSL Session Cache: First the mechanism 
28b219
#   to use and second the expiring timeout (in seconds).
28b219
SSLSessionCache         shmcb:/run/httpd/sslcache(512000)
28b219
SSLSessionCacheTimeout  300
28b219
28b219
#   Pseudo Random Number Generator (PRNG):
28b219
#   Configure one or more sources to seed the PRNG of the 
28b219
#   SSL library. The seed data should be of good random quality.
28b219
#   WARNING! On some platforms /dev/random blocks if not enough entropy
28b219
#   is available. This means you then cannot use the /dev/random device
28b219
#   because it would lead to very long connection times (as long as
28b219
#   it requires to make more entropy available). But usually those
28b219
#   platforms additionally provide a /dev/urandom device which doesn't
28b219
#   block. So, if available, use this one instead. Read the mod_ssl User
28b219
#   Manual for more details.
28b219
SSLRandomSeed startup file:/dev/urandom  256
28b219
SSLRandomSeed connect builtin
28b219
#SSLRandomSeed startup file:/dev/random  512
28b219
#SSLRandomSeed connect file:/dev/random  512
28b219
#SSLRandomSeed connect file:/dev/urandom 512
28b219
28b219
#
28b219
# Use "SSLCryptoDevice" to enable any supported hardware
28b219
# accelerators. Use "openssl engine -v" to list supported
28b219
# engine names.  NOTE: If you enable an accelerator and the
28b219
# server does not start, consult the error logs and ensure
28b219
# your accelerator is functioning properly. 
28b219
#
28b219
SSLCryptoDevice builtin
28b219
#SSLCryptoDevice ubsec
28b219
28b219
##
28b219
## SSL Virtual Host Context
28b219
##
28b219
28b219
<VirtualHost _default_:443>
28b219
28b219
# General setup for the virtual host, inherited from global configuration
28b219
#DocumentRoot "/var/www/html"
28b219
#ServerName www.example.com:443
28b219
28b219
# Use separate log files for the SSL virtual host; note that LogLevel
28b219
# is not inherited from httpd.conf.
28b219
ErrorLog logs/ssl_error_log
28b219
TransferLog logs/ssl_access_log
28b219
LogLevel warn
28b219
28b219
#   SSL Engine Switch:
28b219
#   Enable/Disable SSL for this virtual host.
28b219
SSLEngine on
28b219
28b219
#   SSL Protocol support:
28b219
# List the enable protocol levels with which clients will be able to
28b219
# connect.  Disable SSLv2 access by default:
28b219
SSLProtocol all -SSLv2
28b219
28b219
#   SSL Cipher Suite:
28b219
#   List the ciphers that the client is permitted to negotiate.
28b219
#   See the mod_ssl documentation for a complete list.
28b219
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
28b219
28b219
#   Speed-optimized SSL Cipher configuration:
28b219
#   If speed is your main concern (on busy HTTPS servers e.g.),
28b219
#   you might want to force clients to specific, performance
28b219
#   optimized ciphers. In this case, prepend those ciphers
28b219
#   to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
28b219
#   Caveat: by giving precedence to RC4-SHA and AES128-SHA
28b219
#   (as in the example below), most connections will no longer
28b219
#   have perfect forward secrecy - if the server's key is
28b219
#   compromised, captures of past or future traffic must be
28b219
#   considered compromised, too.
28b219
#SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
28b219
#SSLHonorCipherOrder on 
28b219
28b219
#   Server Certificate:
28b219
# Point SSLCertificateFile at a PEM encoded certificate.  If
28b219
# the certificate is encrypted, then you will be prompted for a
28b219
# pass phrase.  Note that a kill -HUP will prompt again.  A new
28b219
# certificate can be generated using the genkey(1) command.
28b219
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
28b219
28b219
#   Server Private Key:
28b219
#   If the key is not combined with the certificate, use this
28b219
#   directive to point at the key file.  Keep in mind that if
28b219
#   you've both a RSA and a DSA private key you can configure
28b219
#   both in parallel (to also allow the use of DSA ciphers, etc.)
28b219
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
28b219
28b219
#   Server Certificate Chain:
28b219
#   Point SSLCertificateChainFile at a file containing the
28b219
#   concatenation of PEM encoded CA certificates which form the
28b219
#   certificate chain for the server certificate. Alternatively
28b219
#   the referenced file can be the same as SSLCertificateFile
28b219
#   when the CA certificates are directly appended to the server
28b219
#   certificate for convinience.
28b219
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
28b219
28b219
#   Certificate Authority (CA):
28b219
#   Set the CA certificate verification path where to find CA
28b219
#   certificates for client authentication or alternatively one
28b219
#   huge file containing all of them (file must be PEM encoded)
28b219
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
28b219
28b219
#   Client Authentication (Type):
28b219
#   Client certificate verification type and depth.  Types are
28b219
#   none, optional, require and optional_no_ca.  Depth is a
28b219
#   number which specifies how deeply to verify the certificate
28b219
#   issuer chain before deciding the certificate is not valid.
28b219
#SSLVerifyClient require
28b219
#SSLVerifyDepth  10
28b219
28b219
#   Access Control:
28b219
#   With SSLRequire you can do per-directory access control based
28b219
#   on arbitrary complex boolean expressions containing server
28b219
#   variable checks and other lookup directives.  The syntax is a
28b219
#   mixture between C and Perl.  See the mod_ssl documentation
28b219
#   for more details.
28b219
#<Location />
28b219
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
28b219
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
28b219
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
28b219
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
28b219
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
28b219
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
28b219
#</Location>
28b219
28b219
#   SSL Engine Options:
28b219
#   Set various options for the SSL engine.
28b219
#   o FakeBasicAuth:
28b219
#     Translate the client X.509 into a Basic Authorisation.  This means that
28b219
#     the standard Auth/DBMAuth methods can be used for access control.  The
28b219
#     user name is the `one line' version of the client's X.509 certificate.
28b219
#     Note that no password is obtained from the user. Every entry in the user
28b219
#     file needs this password: `xxj31ZMTZzkVA'.
28b219
#   o ExportCertData:
28b219
#     This exports two additional environment variables: SSL_CLIENT_CERT and
28b219
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
28b219
#     server (always existing) and the client (only existing when client
28b219
#     authentication is used). This can be used to import the certificates
28b219
#     into CGI scripts.
28b219
#   o StdEnvVars:
28b219
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
28b219
#     Per default this exportation is switched off for performance reasons,
28b219
#     because the extraction step is an expensive operation and is usually
28b219
#     useless for serving static content. So one usually enables the
28b219
#     exportation for CGI and SSI requests only.
28b219
#   o StrictRequire:
28b219
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
28b219
#     under a "Satisfy any" situation, i.e. when it applies access is denied
28b219
#     and no other module can change it.
28b219
#   o OptRenegotiate:
28b219
#     This enables optimized SSL connection renegotiation handling when SSL
28b219
#     directives are used in per-directory context. 
28b219
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
28b219
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
28b219
    SSLOptions +StdEnvVars
28b219
</Files>
28b219
<Directory "/var/www/cgi-bin">
28b219
    SSLOptions +StdEnvVars
28b219
</Directory>
28b219
28b219
#   SSL Protocol Adjustments:
28b219
#   The safe and default but still SSL/TLS standard compliant shutdown
28b219
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
28b219
#   the close notify alert from client. When you need a different shutdown
28b219
#   approach you can use one of the following variables:
28b219
#   o ssl-unclean-shutdown:
28b219
#     This forces an unclean shutdown when the connection is closed, i.e. no
28b219
#     SSL close notify alert is send or allowed to received.  This violates
28b219
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
28b219
#     this when you receive I/O errors because of the standard approach where
28b219
#     mod_ssl sends the close notify alert.
28b219
#   o ssl-accurate-shutdown:
28b219
#     This forces an accurate shutdown when the connection is closed, i.e. a
28b219
#     SSL close notify alert is send and mod_ssl waits for the close notify
28b219
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
28b219
#     practice often causes hanging connections with brain-dead browsers. Use
28b219
#     this only for browsers where you know that their SSL implementation
28b219
#     works correctly. 
28b219
#   Notice: Most problems of broken clients are also related to the HTTP
28b219
#   keep-alive facility, so you usually additionally want to disable
28b219
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
28b219
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
28b219
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
28b219
#   "force-response-1.0" for this.
28b219
BrowserMatch "MSIE [2-5]" \
28b219
         nokeepalive ssl-unclean-shutdown \
28b219
         downgrade-1.0 force-response-1.0
28b219
28b219
#   Per-Server Logging:
28b219
#   The home of a custom SSL log file. Use this when you want a
28b219
#   compact non-error SSL logfile on a virtual host basis.
28b219
CustomLog logs/ssl_request_log \
28b219
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
28b219
28b219
</VirtualHost>                                  
28b219