Commit Graph

86 Commits

Author SHA1 Message Date
Joris Vink 3b1204d599 Make sure certkey and certfile are NULL after freeing.
From oneswig but I accidentally removed it during the merge.
2016-02-01 21:42:33 +01:00
Joris Vink 82a9e6ef59 Formatting and unbreaking NOHTTP builds. 2016-02-01 20:02:02 +01:00
Stig Telfer 7963a2deaa Added cleanup for the module handlers and validators 2016-02-01 12:13:22 +00:00
Joris Vink 07ed037a00 Reduce memory footprint for NOTLS builds. 2016-01-07 09:20:09 +01:00
Joris Vink c4b1206ae3 Bump copyright to 2016. 2016-01-04 12:58:51 +01:00
Joris Vink 4356c3e628 Allow domain wildcards in the configuration. 2015-12-16 19:51:06 +01:00
Joris Vink 769c78a6e8 Introduce NOHTTP=1 build option.
This basically turns off the HTTP layer for Kore. It does not
compile in anything for HTTP.

This allows Kore to be used as a network application platform as well.
Added an example for this called nohttp.

Other changes that sneaked in while hacking on this:
* Use calloc(), kill pendantic malloc option.
* Killed off SPDY/3.1 support completely, will be superseded by http2

Note that comes with massive changes to a lot of the core API
functions provided by Kore, these might break your application.
2015-11-27 16:22:50 +01:00
Geenz 817b916e1f Call it NOTLS instead.
Per @jorisvink's feedback.
2015-05-25 09:42:34 -04:00
Geenz c44de3f629 Rename BENCHMARK to reflect its actual function.
NO_SSL makes a bit more sense, especially for people who proxy their requests via nginx, apache, or similar.
2015-05-25 09:28:13 -04:00
Joris Vink 02e06b8bb6 Stop client initiated TLS renegotiations completely. 2015-05-20 16:36:13 +02:00
Joris Vink cd35c10224 Make clang a little bit happier. 2015-05-07 20:32:21 +02:00
Joris Vink 384bc8fdd6 Default to only TLSv1.2 from now on.
Add configuration setting tls_version to specify if you
either want TLSv1.2 or TLSv1.0 or both.

The configuration options ssl_cipher and ssl_dhparam
have changed name to tls_cipher and tls_dhparam. There is
no fallback so you might have to update your configs.
2015-05-06 10:59:43 +02:00
Joris Vink af865abede Bump copyright to 2015 2015-04-07 13:08:26 +02:00
Joris Vink f8a9ece9a6 Set the x509 callback when initializing the SSL_CTX.
While here, fix a format string error.
2015-02-20 10:49:14 +01:00
Joris Vink f975453565 Set X509 verification callback and log errors.
When using client certificates Kore now calls
domain_x509_verify() and logs any certificate
verification errors that might occur.

CRL validity errors are ignored.
2015-02-20 10:43:31 +01:00
Joris Vink 0288902a1b Set crlfile to NULL when initializing. 2015-02-20 10:11:15 +01:00
Joris Vink 2049bc72dc By default Kore now uses ECDH/DHE for TLS key exchanges.
This commit disables RSA key exchanges for TLS completely, while
introducing the requirement for always having DH parameters (ssl_dhparam).

Judging from ciphersuites most modern browsers now prefer this
change should be more than ok.
2015-02-03 13:17:59 +01:00
Joris Vink 9bb7001813 Make sure we can still compile with BENCHMARK=1 2014-10-18 02:38:21 +02:00
Joris Vink b49622bb1a Add CRL support.
Allow Kore to use per domain CRLs when requiring client certificates.
The require_client_cert configuration option has been renamed to a more
sane client_certificates and can optionally take a second argument
which is the CRL in pem format.

You'll need a restart in case the CRLs get updated.
2014-10-18 02:32:05 +02:00
Joris Vink 693a07250f bump copyright years 2014-10-14 16:18:23 +02:00
Joris Vink 16f2d00d37 No more SSLv3 allowed. 2014-10-14 15:03:04 +02:00
James Turner 215a4d2da2 Add required header for proper OpenBSD checking 2014-10-01 13:08:38 -04:00
Joris Vink 577462379d Deprecate ssl_no_compression config option, its always on. 2014-08-05 13:07:32 +02:00
Joris Vink c2e4d55235 Add a BENCHMARK compile option which compiles without OpenSSL.
Personally use this for testing Kore its performance without
letting the OpenSSL stack get in the way too much.

Note that it leaves data structures as is, and just removes
any calls to OpenSSL (and removes the linking vs OpenSSL).
2014-08-01 10:22:32 +02:00
Joris Vink 1c685cce90 Comment on why/how we're disabling freelists.
OpenBSD was clever enough to throw these out so no need to
munge the freelist stuff there anymore.
2014-04-11 08:46:50 +02:00
Joris Vink 95819d2dc2 Take away SSL_MODE_RELEASE_BUFFERS for now.
Prevents the weird freelist munging that happens when we're
actually freeing memory (which we should be forcing it to do
by setting freelist_max_len to 0).
2014-04-10 22:52:23 +02:00
Joris Vink 630d8ece05 Fuck it, force OpenSSL to not use its freelists no matter what. 2014-04-09 14:14:09 +02:00
Joris Vink f2aa206f3b Add support for client certificates 2013-12-14 16:31:07 +01:00
Joris Vink 0a49f29e10 Add support for ECDH and provide a better ssl_cipher set by default. 2013-09-24 08:58:05 +02:00
Joris Vink ff613f4665 Use SSL_OP_CIPHER_SERVER_PREFERENCE by default. 2013-08-07 20:42:19 +02:00
Joris Vink bbfbfc4c61 add ssl_no_compression option to allow one to disable OpenSSL compression. 2013-08-07 16:59:45 +02:00
Joris Vink 04ee544982 Add support for ephemeral key exchange mechanisms, ssl_dhparam configuration option must be set (and point to a file containing a generated DH key). 2013-08-07 16:51:39 +02:00
Joris Vink 9c7aaf179f Remove unneeded malloc result casting, annoying habbit of mine but serves no purpose. 2013-07-13 21:08:55 +02:00
Joris Vink c1723f2db5 Clean up header includes, based on a diff from Ewan Higgs via github.
And while we're messing in it, make sure bsd.c compiles again.
2013-07-06 20:55:22 +02:00
Joris Vink b4a0330a96 - Better spread load between all worker processes.
- Introduce own memory management system on top of malloc to keep track
  of all our allocations and free's. Later we should introduce a pooling
  mechanism for fixed size allocations (http_request comes to mind).
- Introduce ssl_cipher in configuration.

Memory usage is kind of high right now, but it seems its OpenSSL
doing it rather then Kore.
2013-06-27 08:43:07 +02:00
Joris Vink 6026a6d4ee add SNI support, and change domain configuration a bit. 2013-06-24 11:32:45 +02:00