1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

233 Commits

Author SHA1 Message Date
Yann Ylavic
a365a65513 mod_ssl: Fix merge problem with SSLProtocol that made SSLProtocol ALL ignored
in virtualhost context (new version of r1653906 reverted by r1653993).

Submitted By: Michael Kaufmann <apache-bugzilla michael-kaufmann.ch>
Committed/modified By: ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653997 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 18:37:06 +00:00
Yann Ylavic
4c52577a7f mod_ssl: revert r1653906, will commit an alternative just after.
The issue with r1653906 is that existing configurations like
"SSLProtocol -SSLv3" (where the default is assumed to be ALL)
won't work anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653993 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 18:27:46 +00:00
Eric Covener
6d6a8a16f1 Fix merge problem with SSLProtocol that made SSLProtocol ALL ignored
in virtualhost context.

Submitted By: Michael Kaufmann <apache-bugzilla michael-kaufmann.ch>
Commited By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653906 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 15:19:39 +00:00
Rainer Jung
bf93fed8a1 Add SSLSessionTickets (on|off).
It controls the use of TLS session tickets
(RFC 5077). Default is unchanged (on).

Using session tickets without restarting
the web server with an appropriate frequency
(e.g. daily) compromises perfect forward
secrecy.

As long as we do not have a nice key management
there should be a way to deactivate session
tickets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1650310 13f79535-47bb-0310-9956-ffa450edef68
2015-01-08 15:34:10 +00:00
Kaspar Brand
9660add80a Add support for extracting subjectAltName entries of type
rfc822Name and dNSName into SSL_{CLIENT,SERVER}_SAN_{Email,DNS}_n
variables.

* docs/manual/mod/mod_ssl.xml: add SSL_*_SAN_*_n entries to the
  environment variables table

* modules/ssl/ssl_engine_kernel.c: in ssl_hook_Fixup, add extraction
  of subjectAltName entries for the "StdEnvVars" case

* modules/ssl/ssl_engine_vars.c: add support for retrieving the
  SSL_{CLIENT,SERVER}_SAN_{Email,DNS}_n variables, either with
  individual on-demand lookup (ssl_var_lookup_ssl_cert_san),
  or with full-list extraction to the environment ("StdEnvVars")

* modules/ssl/ssl_private.h: add modssl_var_extract_san_entries prototype

* modules/ssl/ssl_util_ssl.c: implement SSL_X509_getSAN and
  SSL_ASN1_STRING_to_utf8 helper functions, with factoring out common
  code from SSL_X509_getIDs and SSL_X509_NAME_ENTRY_to_string where
  suitable. Limit SSL_X509_getSAN to the two most common subjectAltName
  entry types appearing in user or server certificates (i.e., rfc822Name
  and dNSName), for the time being.

* modules/ssl/ssl_util_ssl.h: add SSL_ASN1_STRING_to_utf8
  and SSL_X509_getSAN prototypes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1650047 13f79535-47bb-0310-9956-ffa450edef68
2015-01-07 12:24:48 +00:00
Yann Ylavic
31342ca73d Follow up to r1629372 and r1629485: ensure compatibily with OpenSSL < 1.0 (sk_OPENSSL_STRING_[num|value|pop] macros).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629519 13f79535-47bb-0310-9956-ffa450edef68
2014-10-05 18:36:02 +00:00
Kaspar Brand
7cc90787fb Move OCSP stapling information from a per-certificate store
(ex_data attached to an X509 *) to a per-server hash which is
allocated from the pconf pool. Fixes PR 54357, PR 56919 and
a leak with the certinfo_free cleanup function (missing
OCSP_CERTID_free).

* modules/ssl/ssl_util_stapling.c: drop certinfo_free, and add
  ssl_stapling_certid_free (used with apr_pool_cleanup_register).
  Switch to a stapling_certinfo hash which is keyed by the SHA-1
  digest of the certificate's DER encoding, rework ssl_stapling_init_cert
  to only store info once per certificate (allocated from the pconf
  to the extent possible) and extend the logging.

* modules/ssl/ssl_private.h: adjust prototype for
  ssl_stapling_init_cert, replace ssl_stapling_ex_init with
  ssl_stapling_certinfo_hash_init

* modules/ssl/ssl_engine_init.c: adjust ssl_stapling_* calls

Based on initial work by Alex Bligh <alex alex.org.uk>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629372 13f79535-47bb-0310-9956-ffa450edef68
2014-10-04 10:58:49 +00:00
Joe Orton
d3eac27e32 Create DH parameters from OpenSSL at module init, avoiding (very
minor) race and leaks:

* modules/ssl/ssl_engine_init.c (make_dh_params): Moved/rejigged
  variant of make_get_dh() macro.
  (init_dh_params, free_dh_params): New functions.
  (modssl_get_dh_params): Split out from ssl_callback_TmpDH.
  (ssl_init_Module, ssl_init_ModuleKill): Use new init_/free_.

* modules/ssl/ssl_engine_kernel.c: Moved out DH parameter handling.
  (ssl_callback_TmpDH): Use modssl_get_dh_params.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1598107 13f79535-47bb-0310-9956-ffa450edef68
2014-05-28 19:14:28 +00:00
Yann Ylavic
54f9353df0 mod_ssl: follow up to r1583191.
Use type BOOL for modssl_ctx_t's field ocsp_use_request_nonce.
Suggested by: kbrand.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591401 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 17:15:07 +00:00
Yann Ylavic
0e37047e3d mod_ssl: follow up to r1583191.
New SSLOCSPUseRequestNonce directive's manual and CHANGES.

Non functional code changes (modssl_ctx_t's field ocsp_use_request_nonce
grouped with other OCSP ones, nested if turned to a single AND condition).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1584098 13f79535-47bb-0310-9956-ffa450edef68
2014-04-02 17:21:28 +00:00
Yann Ylavic
6508ac17c2 mod_ssl: send OCSP request's nonce according to SSLOCSPUseRequestNonce on/off. PR 56233.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1583191 13f79535-47bb-0310-9956-ffa450edef68
2014-03-30 19:25:20 +00:00
Jeff Trawick
66b8feb600 fix a few spelling errors
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563894 13f79535-47bb-0310-9956-ffa450edef68
2014-02-03 13:50:14 +00:00
Kaspar Brand
b83efdbb99 Followup fix for r1553824:
also pass the file name to ssl_load_encrypted_pkey, to make sure that we
retry with the same filename we used for SSL_CTX_use_PrivateKey_file first


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563417 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 13:57:06 +00:00
Kaspar Brand
a84af8f546 More finishing touches for SSLOpenSSLConfCmd:
- add documentation
- clear the error queue before executing the next SSL_CONF_cmd
- if needed, configure OCSP stapling after a "Certificate" command
- ifdef ssl_cmd_SSLOpenSSLConfCmd in ssl_private.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555464 13f79535-47bb-0310-9956-ffa450edef68
2014-01-05 07:38:28 +00:00
Kaspar Brand
1e80b68ec1 Remove the hardcoded algorithm-type dependency for the SSLCertificateFile
and SSLCertificateKeyFile directives, and deprecate SSLCertificateChainFile

Splitting the patch into smaller pieces turned out to be infeasible,
unfortunately, due to the heavily intertwined code in ssl_engine_config.c,
ssl_engine_init.c and ssl_engine_pphrase.c, which all depends on the
modssl_pk_server_t data structure. For better comprehensibility,
a detailed listing of the changes follows:

ssl_private.h
- drop the X509 certs and EVP_PKEY keys arrays from modssl_pk_server_t
- use apr_array_header_t for cert_files and key_files
- drop tPublicCert from SSLModConfigRec
- drop the ssl_algo_t struct and the SSL_ALGO_* and SSL_AIDX_* constants

ssl_engine_config.c
- change to apr_array_header_t for SSLCertificate[Key]File
- drop ssl_cmd_check_aidx_max, i.e. allow an arbitrary number of certs
  and keys (in theory; currently OpenSSL does not support more than
  one cert/key per algorithm type)
- add deprecation warning for SSLCertificateChainFile

ssl_engine_init.c
- configure server certs/keys in ssl_init_server_certs (no longer via
  ssl_pphrase_Handle in ssl_init_Module)
- in ssl_init_server_certs, read in certificates and keys with standard
  OpenSSL API functions (SSL_CTX_use_*_file), and only fall back to
  ssl_load_encrypted_pkey when encountering an encrypted private key
- drop ssl_server_import_cert, ssl_server_import_key, ssl_init_server_check,
  and ssl_init_ctx_cleanup_server
- move the "problematic re-initialization" check to ssl_init_server_ctx

ssl_engine_pphrase.c
- use servername:port:index as the key identifier, instead of the
  previously used servername:port:algorithm
- ssl_pphrase_Handle overhaul: remove all cert/public-key handling,
  make it only load a single (encrypted) private key, and rename
  to ssl_load_encrypted_pkey
- in the passphrase prompt message, show the private key file name
  instead of the vhost id and the algorithm name
- do no longer supply the algorithm name as an argument to "exec"-type
  passphrase prompting programs

ssl_util.c
- drop ssl_util_algotypeof, ssl_util_algotypestr, ssl_asn1_keystr,
  and ssl_asn1_table_keyfmt

ssl_util_ssl.{c,h}
- drop SSL_read_X509
- constify the filename arg for SSL_read_PrivateKey


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1553824 13f79535-47bb-0310-9956-ffa450edef68
2013-12-28 13:24:17 +00:00
Kaspar Brand
59d183695b Throw away the myCtxVar{Set,Get} abomination and introduce
a pphrase_cb_arg_t struct instead, for passing stuff between
ssl_pphrase_Handle and ssl_pphrase_Handle_CB. Prefer struct
members instead of using additional local variables, to make
the data flow more transparent. (Doesn't "vastly simplify"
the code yet, but hopefully we'll get there when further
stripping down ssl_pphrase_Handle.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546804 13f79535-47bb-0310-9956-ffa450edef68
2013-12-01 11:52:44 +00:00
Kaspar Brand
e7dc6dd3f4 Remove SSLPKCS7CertificateFile support:
- was never documented, so very unlikely that it was ever used

- adds complexity without apparent benefit; PKCS#7 files can
  be trivially converted to a file for use with SSLCertificateChainFile
  (concatenated X509 CERTIFICATE chunks, openssl pkcs7 -print_certs...)

- only supports PKCS7 files with PEM encoding, i.e. relies on a
  non-standardized PEM header (cf. RFC 2315 and draft-josefsson-pkix-textual)

- issues pointed out in http://mail-archives.apache.org/mod_mbox/httpd-dev/200607.mbox/%3C20060723093125.GA19423@redhat.com%3E
  were never fully addressed (cf. r424707 and r424735)

- has never worked in vhost context due to a cfgMergeString
  call missing from modssl_ctx_cfg_merge


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1544784 13f79535-47bb-0310-9956-ffa450edef68
2013-11-23 13:03:25 +00:00
Kaspar Brand
7d402a24ec Address a todo listed in
https://mail-archives.apache.org/mod_mbox/httpd-dev/200205.mbox/%3CPine.LNX.4.33.0205292300380.27841-100000%40mako.covalent.net%3E
"init functions should return status code rather than ssl_die()"

For diagnostic purposes, ssl_die() is still there, but instead
of abruptly exit(1)ing, it will return APR_EGENERAL to the
ssl_init_* callers in ssl_engine_init.c, and these will propagate
the status back to ssl_init_Module.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1544774 13f79535-47bb-0310-9956-ffa450edef68
2013-11-23 12:22:47 +00:00
Stephen Henson
049b1d249d SSL_CONF support for files and directories.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1534754 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 19:55:43 +00:00
Kaspar Brand
169f992d89 Improve ephemeral key handling (companion to r1526168):
- allow to configure custom DHE or ECDHE parameters via the
  SSLCertificateFile directive, and adapt its documentation
  accordingly (addresses PR 49559)

- add standardized DH parameters from RFCs 2409 and 3526,
  use them based on the length of the certificate's RSA/DSA key,
  and add a FAQ entry for clients which limit DH support
  to 1024 bits (such as Java 7 and earlier)

- move ssl_dh_GetParamFromFile() from ssl_engine_dh.c to
  ssl_util_ssl.c, and add ssl_ec_GetParamFromFile()

- drop ssl_engine_dh.c from mod_ssl

For the standardized DH parameters, OpenSSL version 0.9.8a
or later is required, which was therefore made a new minimum
requirement in r1527294.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527295 13f79535-47bb-0310-9956-ffa450edef68
2013-09-29 10:35:46 +00:00
Kaspar Brand
725978c554 Increase minimum required OpenSSL version to 0.9.8a (in preparation
for the next mod_ssl commit, which will rely on the get_rfcX_prime_Y
functions added in that release):

- remove obsolete #defines / macros

- in ssl_private.h, regroup definitions based on whether
  they depend on TLS extension support or not

- for ECC and SRP support, set HAVE_X and change the rather awkward
  #ifndef OPENSSL_NO_X lines accordingly

For the discussion prior to taking this step, see
https://mail-archives.apache.org/mod_mbox/httpd-dev/201309.mbox/%3C524275C7.9060408%40velox.ch%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527294 13f79535-47bb-0310-9956-ffa450edef68
2013-09-29 10:12:47 +00:00
Kaspar Brand
056e10bb4f Follow-up fixes for r1526168:
- drop SSL_TMP_KEY_* constants from ssl_private.h, too

- make sure we also disable aNULL, eNULL and EXP ciphers
  for per-directory SSLCipherSuite directives

- apply the same treatment to SSLProxyCipherSuite


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527291 13f79535-47bb-0310-9956-ffa450edef68
2013-09-29 09:36:31 +00:00
Kaspar Brand
a6a324f9bb Streamline ephemeral key handling:
- drop support for ephemeral RSA keys (only allowed/needed
  for export ciphers)

- drop pTmpKeys from the per-process SSLModConfigRec, and remove
  the temp key generation at startup (unnecessary for DHE/ECDHE)

- unconditionally disable null and export-grade ciphers by always
  prepending "!aNULL:!eNULL:!EXP:" to any cipher suite string

- do not configure per-connection SSL_tmp_*_callbacks, as it is
  sufficient to set them for the SSL_CTX

- set default curve for ECDHE at startup, obviating the need
  for a per-handshake callback, for the time being (and also
  configure SSL_OP_SINGLE_ECDH_USE, previously left out)

For additional background, see
https://mail-archives.apache.org/mod_mbox/httpd-dev/201309.mbox/%3C52358ED1.2070704@velox.ch%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1526168 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 12:52:35 +00:00
Joe Orton
4c35482180 Remove unnecessary global declarations of optional function
implementations:

* modules/ssl/mod_ssl.c (ssl_proxy_enable, ssl_engine_disable): Mark
  static.

* modules/ssl/ssl_private.h (ssl_proxy_enable, ssl_engine_disable):
  Remove declarations.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1487775 13f79535-47bb-0310-9956-ffa450edef68
2013-05-30 07:23:52 +00:00
Joe Orton
b3ce136d05 mod_ssl: Redesign NPN (Next Protocol Negotiation) API to avoid use of
hooks API and inter-module hard linkage:

* modules/ssl/mod_ssl.h: Remove NPN hooks, add "modssl_register_npn"
  optional function and callback function type declarations for
  ssl_npn_advertise_protos, ssl_npn_proto_negotiated.

* modules/ssl/mod_ssl.c: Drop hooks.
  (modssl_register_npn): New optional function implementation.
  (ssl_register_hooks): Register it.

* modules/ssl/ssl_private.h (SSLConnRec): Add npn_advertfns,
  npn_negofns array fields.

* modules/ssl/ssl_engine_kernel.c (ssl_callback_AdvertiseNextProtos): 
  Replace use of hook API with array iteration.

* modules/ssl/ssl_engine_io.c (ssl_io_filter_input): Likewise.

Reviewed by: Matthew Steele <mdsteele google.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1487772 13f79535-47bb-0310-9956-ffa450edef68
2013-05-30 07:19:07 +00:00
Kaspar Brand
1c780f18be revert r1352596, for the reasons explained in
https://mail-archives.apache.org/mod_mbox/httpd-dev/201304.mbox/%3C515FED7C.5010009%40velox.ch%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1468131 13f79535-47bb-0310-9956-ffa450edef68
2013-04-15 15:56:07 +00:00
Stefan Fritsch
8736e6a6d0 Avoid valgrind warnings in mod_ssl random number generator
We intentionally add uninitialized stack memory. To avoid warnings,
make valgrind believe that the memory is defined.

Add configure option to enable valgrind support


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1442307 13f79535-47bb-0310-9956-ffa450edef68
2013-02-04 19:34:08 +00:00
Kaspar Brand
50eb694c34 mod_ssl: add support for subjectAltName-based host name checking in proxy mode
(PR 54030)

factor out code from ssl_engine_init.c:ssl_check_public_cert()
to ssl_util_ssl.c:SSL_X509_match_name()

introduce new SSLProxyCheckPeerName directive, which should eventually
obsolete SSLProxyCheckPeerCN

ssl_engine_io.c:ssl_io_filter_handshake(): avoid code duplication
when aborting with HTTP_BAD_GATEWAY


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425874 13f79535-47bb-0310-9956-ffa450edef68
2012-12-26 10:54:54 +00:00
Stephen Henson
2f58146bae Add support for OpenSSL configuration commands.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421323 13f79535-47bb-0310-9956-ffa450edef68
2012-12-13 14:52:47 +00:00
Ben Laurie
d79a70a76a RFC 5878 support.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1352596 13f79535-47bb-0310-9956-ffa450edef68
2012-06-21 16:17:41 +00:00
Stefan Fritsch
80ab7f95b9 Pass the server_rec to ssl_die() and use it to log a message to the main error
log, pointing to the appropriate virtual host error log


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1348660 13f79535-47bb-0310-9956-ffa450edef68
2012-06-10 21:00:39 +00:00
Stefan Fritsch
88d5d9dbb2 If OPENSSL_NO_COMP is defined, omit merging the compression flag.
Also make some code more compact, as suggested by kbrand.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1348656 13f79535-47bb-0310-9956-ffa450edef68
2012-06-10 20:21:38 +00:00
Stefan Fritsch
6dd8ce1c33 Add some improvements as suggested by Kaspar
- expand comment in config file
- check username == NULL
- detect SRP support via SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB, not via openssl
  version
- rename rv variable


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1348653 13f79535-47bb-0310-9956-ffa450edef68
2012-06-10 19:50:25 +00:00
Stefan Fritsch
ccf77a856a Add support for TLS-SRP (Secure Remote Password key exchange
for TLS, RFC 5054).

PR: 51075
Submitted by: Quinn Slack <sqs cs stanford edu>, Christophe Renou,
              Peter Sylvester


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1347980 13f79535-47bb-0310-9956-ffa450edef68
2012-06-08 09:38:44 +00:00
Stefan Fritsch
510d3f904e Add new directive SSLCompression to disable SSL-level compression.
PR: 53219
Submitted by: Björn Jacke <bjoern j3e de>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1345319 13f79535-47bb-0310-9956-ffa450edef68
2012-06-01 19:36:37 +00:00
Joe Orton
dd5f55ce6b Add support for TLS Next Protocol Negotiation:
* modules/ssl/mod_ssl.c, modules/ssl/mod_ssl.h: Add and implement new
  hooks for next protocol advertisement/discovery.

* modules/ssl/ssl_engine_init.c (ssl_init_ctx_callbacks): Enable
  NPN advertisement callback in handshake.

* modules/ssl/ssl_engine_io.c (ssl_io_filter_input): Invoke
  next-protocol discovery hook.

* modules/ssl/ssl_engine_kernel.c (ssl_callback_AdvertiseNextProtos): 
  New callback.

* modules/ssl/ssl_private.h: Add prototype.

Submitted by: Matthew Steele <mdsteele google.com>
  with slight tweaks by jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1332643 13f79535-47bb-0310-9956-ffa450edef68
2012-05-01 13:27:14 +00:00
Stefan Fritsch
43d54ae919 When receiving http on https, send the error response with http 1.0
It is important that we send a proper error status, or search engines
may index the error message.
    
PR: 50823


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1328325 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 11:21:12 +00:00
Stefan Fritsch
960f0a63cd Initialize EC temporary key on server startup, as for DH and
RSA. This fixes a race condition that could lead to a crash with threaded
MPMs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1294306 13f79535-47bb-0310-9956-ffa450edef68
2012-02-27 20:01:40 +00:00
Kaspar Brand
1af61dfb2e SSLProtocol: allow explicit control of TLSv1.1 and TLSv1.2 flavors when
compiled against OpenSSL 1.0.1 or later. Update documentation.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1222921 13f79535-47bb-0310-9956-ffa450edef68
2011-12-24 06:40:10 +00:00
Kaspar Brand
9900465205 Set OPENSSL_NO_SSL_INTERN when compiling against OpenSSL 1.0.1
or later, so that mod_ssl retains binary compatibility with future
versions when internal structures are changed. Use API functions
where available, and fall back to direct access for OpenSSL up
to 1.0.0, where needed.

Remove SSL_make_ciphersuite() from ssl_util_ssl.[ch], as it was
never used by any released version of mod_ssl.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1222917 13f79535-47bb-0310-9956-ffa450edef68
2011-12-24 06:31:37 +00:00
Kaspar Brand
8d37f73ce7 Streamline TLS session ticket key handling (added in r1200040):
- drop the SSLTicketKeyDefault directive, and only support a single
  ticket key per server/vhost
- rename the SSLTicketKeyFile directive to SSLSessionTicketKeyFile,
  remove the keyname parameter
- move ticket key parameters from SSLSrvConfigRec to modssl_ctx_t
- configure the tlsext_ticket_key_cb only when in server mode
- add documentation for SSLSessionTicketKeyFile


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1213380 13f79535-47bb-0310-9956-ffa450edef68
2011-12-12 19:21:35 +00:00
Kaspar Brand
304e9c4c08 drop SSLv2 support (set SSL_OP_NO_SSLv2 for any new SSL_CTX)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203491 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 05:27:00 +00:00
Joe Orton
de5161b3d9 * modules/ssl/ssl_private.h, modules/ssl/ssl_engine_kernel.c
(ssl_callback_tlsext_tickets): Use unsigned char * to fix gcc
  -Wpointer-sign warnings.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200482 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 19:17:52 +00:00
Paul Querna
4935d31e45 Whitespace fixes for r1200040
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200045 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 23:44:53 +00:00
Paul Querna
8b2e0e56c2 Add support for RFC 5077 TLS Session tickets. This adds two new directives:
* SSLTicketKeyFile: To store the private information for the encryption of the ticket.
* SSLTicketKeyDefault To set the default, otherwise the first listed token is used.  This enables key rotation across servers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200040 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 23:37:37 +00:00
Daniel Ruggeri
c4736a5326 Final update to SSLProxyMachineCertificateChainFile
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1175946 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 16:39:00 +00:00
Jim Jagielski
103f776c25 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:38:09 +00:00
Kaspar Brand
693aab21f0 Add ssl_log_xerror() and ssl_log_rxerror(), modeled after ssl_log_cxerror().
Add SSL_X509_NAME_to_string(), which converts an X509 distinguished name
to an RFC 2253 formatted string.
Adapt ssl_log_*error() to make use of SSL_X509_NAME_to_string().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172797 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 20:23:27 +00:00
Daniel Ruggeri
47cf15b852 Modify SSLProxyMachineCertificateChainFile to use X509 instead of X509_INFO and use openssl to construct the chain
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1170833 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 20:16:02 +00:00
Kaspar Brand
2c24630059 Revamp CRL checking for client and remote servers:
- completely delegate CRL processing to OpenSSL
- introduce a new [Proxy]CARevocationCheck directive
- drop ssl_callback_SSLVerify_CRL from ssl_engine_kernel.c
- remove X509_STORE from modssl_ctx_t
- drop CRL store helper functions from ssl_util_ssl.c
- avoid sending "certificate_expired" SSL alerts to peers
  when the nextUpdate field of a CRL is in the past


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1165056 13f79535-47bb-0310-9956-ffa450edef68
2011-09-04 15:57:03 +00:00