Blame SPECS/ssl.conf

Packit 718f12
#
Packit 718f12
# When we also provide SSL we have to listen to the 
Packit 718f12
# standard HTTPS port in addition.
Packit 718f12
#
Packit 718f12
Listen 443 https
Packit 718f12
Packit 718f12
##
Packit 718f12
##  SSL Global Context
Packit 718f12
##
Packit 718f12
##  All SSL configuration in this context applies both to
Packit 718f12
##  the main server and all SSL-enabled virtual hosts.
Packit 718f12
##
Packit 718f12
Packit 718f12
#   Pass Phrase Dialog:
Packit 718f12
#   Configure the pass phrase gathering process.
Packit 718f12
#   The filtering dialog program (`builtin' is a internal
Packit 718f12
#   terminal dialog) has to provide the pass phrase on stdout.
Packit 718f12
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
Packit 718f12
Packit 718f12
#   Inter-Process Session Cache:
Packit 718f12
#   Configure the SSL Session Cache: First the mechanism 
Packit 718f12
#   to use and second the expiring timeout (in seconds).
Packit 718f12
SSLSessionCache         shmcb:/run/httpd/sslcache(512000)
Packit 718f12
SSLSessionCacheTimeout  300
Packit 718f12
Packit 718f12
#
Packit 718f12
# Use "SSLCryptoDevice" to enable any supported hardware
Packit 718f12
# accelerators. Use "openssl engine -v" to list supported
Packit 718f12
# engine names.  NOTE: If you enable an accelerator and the
Packit 718f12
# server does not start, consult the error logs and ensure
Packit 718f12
# your accelerator is functioning properly. 
Packit 718f12
#
Packit 718f12
SSLCryptoDevice builtin
Packit 718f12
#SSLCryptoDevice ubsec
Packit 718f12
Packit 718f12
##
Packit 718f12
## SSL Virtual Host Context
Packit 718f12
##
Packit 718f12
Packit 718f12
<VirtualHost _default_:443>
Packit 718f12
Packit 718f12
# General setup for the virtual host, inherited from global configuration
Packit 718f12
#DocumentRoot "/var/www/html"
Packit 718f12
#ServerName www.example.com:443
Packit 718f12
Packit 718f12
# Use separate log files for the SSL virtual host; note that LogLevel
Packit 718f12
# is not inherited from httpd.conf.
Packit 718f12
ErrorLog logs/ssl_error_log
Packit 718f12
TransferLog logs/ssl_access_log
Packit 718f12
LogLevel warn
Packit 718f12
Packit 718f12
#   SSL Engine Switch:
Packit 718f12
#   Enable/Disable SSL for this virtual host.
Packit 718f12
SSLEngine on
Packit 718f12
Packit 718f12
#   List the protocol versions which clients are allowed to connect with.
Packit 718f12
#   The OpenSSL system profile is used by default.  See
Packit 718f12
#   update-crypto-policies(8) for more details.
Packit 718f12
#SSLProtocol all -SSLv3
Packit 718f12
#SSLProxyProtocol all -SSLv3
Packit 718f12
Packit 718f12
#   User agents such as web browsers are not configured for the user's
Packit 718f12
#   own preference of either security or performance, therefore this
Packit 718f12
#   must be the prerogative of the web server administrator who manages
Packit 718f12
#   cpu load versus confidentiality, so enforce the server's cipher order.
Packit 718f12
SSLHonorCipherOrder on
Packit 718f12
Packit 718f12
#   SSL Cipher Suite:
Packit 718f12
#   List the ciphers that the client is permitted to negotiate.
Packit 718f12
#   See the mod_ssl documentation for a complete list.
Packit 718f12
#   The OpenSSL system profile is configured by default.  See
Packit 718f12
#   update-crypto-policies(8) for more details.
Packit 718f12
SSLCipherSuite PROFILE=SYSTEM
Packit 718f12
SSLProxyCipherSuite PROFILE=SYSTEM
Packit 718f12
Packit 718f12
#   Point SSLCertificateFile at a PEM encoded certificate.  If
Packit 718f12
#   the certificate is encrypted, then you will be prompted for a
Packit 718f12
#   pass phrase.  Note that restarting httpd will prompt again.  Keep
Packit 718f12
#   in mind that if you have both an RSA and a DSA certificate you
Packit 718f12
#   can configure both in parallel (to also allow the use of DSA
Packit 718f12
#   ciphers, etc.)
Packit 718f12
#   Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
Packit 718f12
#   require an ECC certificate which can also be configured in
Packit 718f12
#   parallel.
Packit 718f12
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
Packit 718f12
Packit 718f12
#   Server Private Key:
Packit 718f12
#   If the key is not combined with the certificate, use this
Packit 718f12
#   directive to point at the key file.  Keep in mind that if
Packit 718f12
#   you've both a RSA and a DSA private key you can configure
Packit 718f12
#   both in parallel (to also allow the use of DSA ciphers, etc.)
Packit 718f12
#   ECC keys, when in use, can also be configured in parallel
Packit 718f12
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
Packit 718f12
Packit 718f12
#   Server Certificate Chain:
Packit 718f12
#   Point SSLCertificateChainFile at a file containing the
Packit 718f12
#   concatenation of PEM encoded CA certificates which form the
Packit 718f12
#   certificate chain for the server certificate. Alternatively
Packit 718f12
#   the referenced file can be the same as SSLCertificateFile
Packit 718f12
#   when the CA certificates are directly appended to the server
Packit 718f12
#   certificate for convenience.
Packit 718f12
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
Packit 718f12
Packit 718f12
#   Certificate Authority (CA):
Packit 718f12
#   Set the CA certificate verification path where to find CA
Packit 718f12
#   certificates for client authentication or alternatively one
Packit 718f12
#   huge file containing all of them (file must be PEM encoded)
Packit 718f12
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
Packit 718f12
Packit 718f12
#   Client Authentication (Type):
Packit 718f12
#   Client certificate verification type and depth.  Types are
Packit 718f12
#   none, optional, require and optional_no_ca.  Depth is a
Packit 718f12
#   number which specifies how deeply to verify the certificate
Packit 718f12
#   issuer chain before deciding the certificate is not valid.
Packit 718f12
#SSLVerifyClient require
Packit 718f12
#SSLVerifyDepth  10
Packit 718f12
Packit 718f12
#   Access Control:
Packit 718f12
#   With SSLRequire you can do per-directory access control based
Packit 718f12
#   on arbitrary complex boolean expressions containing server
Packit 718f12
#   variable checks and other lookup directives.  The syntax is a
Packit 718f12
#   mixture between C and Perl.  See the mod_ssl documentation
Packit 718f12
#   for more details.
Packit 718f12
#<Location />
Packit 718f12
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
Packit 718f12
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
Packit 718f12
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
Packit 718f12
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
Packit 718f12
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
Packit 718f12
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
Packit 718f12
#</Location>
Packit 718f12
Packit 718f12
#   SSL Engine Options:
Packit 718f12
#   Set various options for the SSL engine.
Packit 718f12
#   o FakeBasicAuth:
Packit 718f12
#     Translate the client X.509 into a Basic Authorisation.  This means that
Packit 718f12
#     the standard Auth/DBMAuth methods can be used for access control.  The
Packit 718f12
#     user name is the `one line' version of the client's X.509 certificate.
Packit 718f12
#     Note that no password is obtained from the user. Every entry in the user
Packit 718f12
#     file needs this password: `xxj31ZMTZzkVA'.
Packit 718f12
#   o ExportCertData:
Packit 718f12
#     This exports two additional environment variables: SSL_CLIENT_CERT and
Packit 718f12
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
Packit 718f12
#     server (always existing) and the client (only existing when client
Packit 718f12
#     authentication is used). This can be used to import the certificates
Packit 718f12
#     into CGI scripts.
Packit 718f12
#   o StdEnvVars:
Packit 718f12
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
Packit 718f12
#     Per default this exportation is switched off for performance reasons,
Packit 718f12
#     because the extraction step is an expensive operation and is usually
Packit 718f12
#     useless for serving static content. So one usually enables the
Packit 718f12
#     exportation for CGI and SSI requests only.
Packit 718f12
#   o StrictRequire:
Packit 718f12
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
Packit 718f12
#     under a "Satisfy any" situation, i.e. when it applies access is denied
Packit 718f12
#     and no other module can change it.
Packit 718f12
#   o OptRenegotiate:
Packit 718f12
#     This enables optimized SSL connection renegotiation handling when SSL
Packit 718f12
#     directives are used in per-directory context. 
Packit 718f12
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
Packit 718f12
<FilesMatch "\.(cgi|shtml|phtml|php)$">
Packit 718f12
    SSLOptions +StdEnvVars
Packit 718f12
</FilesMatch>
Packit 718f12
<Directory "/var/www/cgi-bin">
Packit 718f12
    SSLOptions +StdEnvVars
Packit 718f12
</Directory>
Packit 718f12
Packit 718f12
#   SSL Protocol Adjustments:
Packit 718f12
#   The safe and default but still SSL/TLS standard compliant shutdown
Packit 718f12
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
Packit 718f12
#   the close notify alert from client. When you need a different shutdown
Packit 718f12
#   approach you can use one of the following variables:
Packit 718f12
#   o ssl-unclean-shutdown:
Packit 718f12
#     This forces an unclean shutdown when the connection is closed, i.e. no
Packit 718f12
#     SSL close notify alert is sent or allowed to be received.  This violates
Packit 718f12
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
Packit 718f12
#     this when you receive I/O errors because of the standard approach where
Packit 718f12
#     mod_ssl sends the close notify alert.
Packit 718f12
#   o ssl-accurate-shutdown:
Packit 718f12
#     This forces an accurate shutdown when the connection is closed, i.e. a
Packit 718f12
#     SSL close notify alert is sent and mod_ssl waits for the close notify
Packit 718f12
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
Packit 718f12
#     practice often causes hanging connections with brain-dead browsers. Use
Packit 718f12
#     this only for browsers where you know that their SSL implementation
Packit 718f12
#     works correctly. 
Packit 718f12
#   Notice: Most problems of broken clients are also related to the HTTP
Packit 718f12
#   keep-alive facility, so you usually additionally want to disable
Packit 718f12
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
Packit 718f12
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
Packit 718f12
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
Packit 718f12
#   "force-response-1.0" for this.
Packit 718f12
BrowserMatch "MSIE [2-5]" \
Packit 718f12
         nokeepalive ssl-unclean-shutdown \
Packit 718f12
         downgrade-1.0 force-response-1.0
Packit 718f12
Packit 718f12
#   Per-Server Logging:
Packit 718f12
#   The home of a custom SSL log file. Use this when you want a
Packit 718f12
#   compact non-error SSL logfile on a virtual host basis.
Packit 718f12
CustomLog logs/ssl_request_log \
Packit 718f12
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
Packit 718f12
Packit 718f12
</VirtualHost>
Packit 718f12