Commit Graph

610 Commits

Author SHA1 Message Date
Joris Vink
1507f88ec7 Respect keepalive when throwing HTTP errors.
Report from github issue #34
2015-02-06 10:59:15 +01:00
Joris Vink
6d90291405 Set rootdir earlier in cli_create(). 2015-02-06 09:02:52 +01:00
Joris Vink
be96a93f9e Add missing ssl_dhparam to all example configs. 2015-02-06 09:02:29 +01:00
Joris Vink
12c07b79e6 Kill a warning when building with BENCHMARK 2015-02-04 19:40:49 +01:00
Joris Vink
6eec8166c6 "request" auth blocks should set their own response. 2015-02-04 12:04:07 +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
b1e5a806a6 No need to assign ret when failing here. 2015-01-19 15:32:52 +01:00
Joris Vink
67efb9b04a better brackets around some if statements. 2015-01-19 15:31:36 +01:00
Joris Vink
2ee72657e1 Brackets would be great here. 2015-01-19 15:26:53 +01:00
Joris Vink
aaf00e92f8 add version correctly 2014-12-12 19:48:31 +01:00
Joris Vink
bb7cfbf08c Add 1.2.1-release to README 2014-12-12 19:47:51 +01:00
Joris Vink
b6658ef117 Bump to 1.2.1-develop 2014-12-12 19:36:56 +01:00
Joris Vink
6005c95ee6 Fix compiling under openbsd 2014-12-12 19:09:44 +01:00
Joris Vink
d9e2eb7a65 Bump to 1.2.1-release 2014-12-12 18:59:08 +01:00
Joris Vink
dbe301e58c Add a patch level to our version number. 2014-12-12 13:06:41 +01:00
Joris Vink
182126080e Merge pull request #25 from apfohl/prefix
Added ability to set path prefix during make.
2014-12-12 12:40:44 +01:00
Andreas Pfohl
24e1d3928d Added ability to set path prefix during make. 2014-12-12 10:15:30 +01:00
Joris Vink
c494126720 Make worker_clients available everywhere. 2014-12-03 20:40:44 +01:00
Joris Vink
7b286f2f70 Set correct timeout start for websockets 2014-11-25 20:00:33 +01:00
Joris Vink
8fe16c193a Link with -lcrypto even for BENCHMARK 2014-11-24 11:31:50 +01:00
Joris Vink
ffe3fdc49d Add websocket mention 2014-11-24 11:11:01 +01:00
Joris Vink
1a680d8d09 Remove lingering diff file 2014-11-24 11:09:19 +01:00
Joris Vink
f867882f43 Add websocket support to Kore.
Introduces a few new api functions:

- kore_websocket_handshake(struct http_request *):
	Performs the handshake on an HTTP request (coming from page handler)

- kore_websocket_send(struct connection *, u_int8_t, void *, size_t):
	Sends data to a websocket connection.

- kore_websocket_broadcast(struct connection *, u_int8_t, void *, size_t, int):
	Broadcast the given websocket op and data to all connected
	websocket clients on the worker. Note that as of right now
	the WEBSOCKET_BROADCAST_GLOBAL scope option does not work
	yet and messages broadcasted will be restricted to workers
	only.

- kore_worker_websocket_broadcast(struct connection *, void *, void *):
	Backend function used by kore_websocket_broadcast().
	Could prove useful for developers to have access to.

A simple example is given under examples/websocket.

Known issues:
	Kore does not support PING or CONT frames just yet.
2014-11-24 11:08:34 +01:00
Joris Vink
ac4222e929 Proper use of kore_strtonum64(). 2014-11-24 10:39:38 +01:00
Joris Vink
a1e6588085 Repopulate now when we are doing idle timer checks.
Otherwise in a weird scenario the idle timer could
be started with a more recent time then the time we
test against causing a connection to disconnect
before its idle timer was over.
2014-11-21 16:38:23 +01:00
Joris Vink
9184257d97 Properly order linker arguments.
Fixes broken linkages with LDFLAGS on certain platforms see #23.
2014-11-19 14:20:31 +01:00
Joris Vink
280cd6791e bump README 2014-11-07 17:19:41 +01:00
Joris Vink
0f2a6271b9 Bump readme 2014-11-07 09:14:53 +01:00
Joris Vink
a4d50d3ddf Remove the my_callback example. Deprecated. 2014-10-31 10:14:47 +01:00
Joris Vink
b1797231cc Properly error out in HTML5 video streaming. 2014-10-31 10:13:45 +01:00
Joris Vink
27b4447a30 Allow workers to bind to specific CPUs on FreeBSD. 2014-10-26 22:41:55 +01:00
Joris Vink
9512805c04 spacing 2014-10-26 22:11:13 +01:00
Joris Vink
6de0f8568a Rework net, worker and some http internals.
- The net code no longer has a recv_queue, instead reuse same recv buffer.
- Introduce net_recv_reset() to reset the recv buffer when needed.
- Have the workers spread the load better between them by slightly
  delaying their next accept lock and giving them an accept treshold
  so they don't go ahead and keep accepting connections if they end
  up winning the race constantly between the workers.
- The kore_worker_acceptlock_release() is no longer available.

- Prepopulate the HTTP server response header that is added to each
  response in both normal HTTP and SPDY modes.
- The path and host members of http_request are now allocated on the heap.

These changes overall result better performance on a multicore machine,
especially the worker load changes shine through.
2014-10-22 21:16:49 +02:00
Joris Vink
0e8bdf38c4 Indenting police 2014-10-22 20:50:32 +02:00
Joris Vink
0d17d2228c Bring ktunnel example client in line with reality 2014-10-22 19:00:48 +02:00
Joris Vink
ffe94ff585 KORE_LDFLAGS is no more. 2014-10-22 18:48:43 +02:00
Joris Vink
b9445e84ca Use the right ssl_ctx 2014-10-22 18:44:31 +02:00
Joris Vink
217b2749f9 Merge pull request #22 from thorduri/master
Simplify environment variables, abide by POLA.
2014-10-22 18:32:36 +02:00
Thordur Bjornsson
e980dcdd5c Simplify environment variables, abide by POLA.
KORE_COMPILER => CC
KORE_LDFLAGS => LDFLAGS
2014-10-22 17:44:43 +02:00
Joris Vink
4f1336558c Merge pull request #21 from thorduri/master
Honor CC from the environment.
2014-10-22 17:13:04 +02:00
Thordur Bjornsson
c271ea6b3e Honor CC from the environment. 2014-10-22 17:02:25 +02:00
Joris Vink
81bc889abc Make ktunnel example tls1.2 only 2014-10-22 08:36:50 +02: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
523bc521c7 Generate certs with sha256 digests from now on. 2014-10-18 01:28:47 +02:00
Joris Vink
79b3ccfe7d kqueue event list should hold worker_max_connections * 2 2014-10-16 21:45:43 +02:00
Joris Vink
693a07250f bump copyright years 2014-10-14 16:18:23 +02:00
Joris Vink
d142db2f45 Bump 2014-10-14 16:16:06 +02:00
Joris Vink
16f2d00d37 No more SSLv3 allowed. 2014-10-14 15:03:04 +02:00
Joris Vink
5855a88862 Increase frequency of idle_check. 2014-10-13 16:34:42 +02:00