Commit Graph

1793 Commits

Author SHA1 Message Date
Nikos Mavrogiannopoulos
0b47b305de improved documentation of user-profile option 2017-01-04 16:20:57 +01:00
Nikos Mavrogiannopoulos
3c8cdaedb1 Send "config client" XML field after successful auth
This allows to advertise the XML configuration file for the
client to download, in recent openconnect clients. In addition
made support for the client XML file unconditional (no longer
depending on the anyconnect client compatibility flag).
2017-01-04 16:20:29 +01:00
Nikos Mavrogiannopoulos
62bce8ddcf improved message on file limit update
Relates #85
2016-12-23 09:22:53 +01:00
Nikos Mavrogiannopoulos
442ceda8c0 when setting limits keep untouched the maximum number
Relates #85
2016-12-23 09:21:54 +01:00
Nikos Mavrogiannopoulos
1f8304fc04 Improve output of --version 2016-12-23 09:14:59 +01:00
Nikos Mavrogiannopoulos
18f003805b optimized loop in check_multiple_users
That is return early, once exceeding entries have been
detected.
2016-12-23 09:14:31 +01:00
Nikos Mavrogiannopoulos
eed6ff6902 Makefile.am: corrected typo 2016-12-14 09:03:30 +01:00
Mike Miller
34fd11d3a8 Fix typos in man pages, config files, and comments
Signed-off-by: Mike Miller <mtmiller@debian.org>
2016-12-13 18:01:23 -08:00
Nikos Mavrogiannopoulos
2c64c99baa Reverted recursive make in src/
This simplifies the make process and allows for greater parallelism
during build.
2016-12-13 15:37:07 +01:00
Nikos Mavrogiannopoulos
1b7e00ed02 Use unique names for autogen files
This addresses issue in parallel builds caused by autogen
using the same temporary files for both occtl and ocpasswd
files.

Resolves #76
2016-12-13 09:39:51 +01:00
Nikos Mavrogiannopoulos
7fea131d00 use stamp files to allow parallel build of autogen files
Autogen seems to output on the creates files gradually, something that
makes 'make' believe that the command is complete prior to the output
file being fully populated. The current approach uses stamp files to
ensure that no incomplete files are used for compilation.
2016-12-10 14:30:15 +01:00
Nikos Mavrogiannopoulos
e42c5ed7e7 autogen: store and use auto-generated autogen .in files in git builds
This simplifies the generation of the files (delegated to configure),
and allows systems without autogen to be used to compile git sources.
2016-11-17 08:28:11 +01:00
Nikos Mavrogiannopoulos
1f940f04c5 Revert "autogen: store and use auto-generated autogen files in git builds"
This reverts commit d0908f2c52.
2016-11-16 22:24:23 +01:00
Nikos Mavrogiannopoulos
7606842d99 occtl.8: Added examples of usage 2016-11-14 14:15:50 +01:00
Nikos Mavrogiannopoulos
e7b1636de4 occtl.8: added more info on JSON output 2016-11-14 14:10:49 +01:00
Nikos Mavrogiannopoulos
b7b8c084d0 common.mk: corrected path of generated static libs 2016-11-11 18:17:28 +01:00
Nikos Mavrogiannopoulos
d0908f2c52 autogen: store and use auto-generated autogen files in git builds
That is, if autogen is not present in the build system use the
stored files.
2016-11-11 18:17:22 +01:00
Nikos Mavrogiannopoulos
2c6f73222d when compiled with gnutls 3.5.6 or later use its pre-generated DH parameters 2016-11-11 09:37:12 +01:00
Nikos Mavrogiannopoulos
bcb2ec6505 ocserv: pre-load the OCSP response file
That allows the worker processes to serve OCSP responses, even when they
have no access to the actual file.
2016-11-11 09:17:31 +01:00
Andrew Patrikalakis
69261b6aa8 Automatically switch to TCP in case of no received UDP traffic
and enable by default
2016-11-01 19:53:33 -07:00
Nikos Mavrogiannopoulos
9462dfd8c3 html: enhanced HTML decoding with decoding of explicit unicode chars 2016-10-16 17:08:49 +02:00
Nikos Mavrogiannopoulos
d743cf7bdd html: fixed URL escaping 2016-10-16 15:48:17 +02:00
Nikos Mavrogiannopoulos
f0f25dde00 doc: point to README-radius.md for radius configuration attributes 2016-10-09 17:39:37 +02:00
Nikos Mavrogiannopoulos
e474a15598 radius: update the worker's pid on subsequent updates
That is, even if we initially advertize the PID of the worker
handling the client as NAS-Port, the client may eventually end-up
being served by another process. In that case we make sure that
the radius server is notified on the next accounting message.
2016-09-27 09:06:18 +02:00
Nikos Mavrogiannopoulos
5fce6c8c86 Use the X-AnyConnect-Identifier-Platform header to identify mobile clients
That is, if the header contains "android" or "apple-ios" mark it as
a mobile client. The header X-AnyConnect-Identifier-DeviceType is only
considered for logging purposes and appended to the user-agent name
if present.
2016-09-25 15:44:43 +02:00
Nikos Mavrogiannopoulos
8f8ff565af get_session_id: added explicit casts 2016-09-22 15:56:23 +02:00
Nikos Mavrogiannopoulos
c53b97367e config: more consistent printing of startup error and info messages 2016-09-22 15:52:22 +02:00
Nikos Mavrogiannopoulos
445b9070a6 untied the cisco-client-compat option from the DTLS-LEGACY protocol
Introduced instead the 'dtls-legacy' config option which can be used
to explicitly disable the legacy DTLS protocol.
2016-09-22 15:43:50 +02:00
Nikos Mavrogiannopoulos
bd87c7607e renamed match-tls-and-dtls-ciphers to match-tls-dtls-ciphers 2016-09-22 15:26:02 +02:00
Nikos Mavrogiannopoulos
4c85fa97f0 Added configuration option 'dtls-psk'
When this option is set to false, the DTLS-PSK protocol
will not be negotiated by worker processes. The process will fallback
to the legacy protocol in that case.
2016-09-22 15:20:35 +02:00
Nikos Mavrogiannopoulos
33089ab74e Updated the new DTLS protocol negotiation
The server sends the X-DTLS-App-ID header in the new protocol;
the X-DTLS-Session-ID is only used in the legacy protocol. The
server expects the Application identifier to be placed in a TLS
extension.
2016-09-21 08:53:35 +02:00
Nikos Mavrogiannopoulos
a5a80f8236 seccomp: add getrandom syscall to filter only when it is available 2016-09-21 08:53:08 +02:00
Nikos Mavrogiannopoulos
ede5d97be8 worker: increased the wait time for the SEC_AUTH_REPLY message from sec-mod
That is, to allow for authentication methods which require the user input
prior to returning a reply.
2016-09-15 08:38:53 +02:00
Nikos Mavrogiannopoulos
0a4e06b354 Only send the X-DTLS-MTU in the legacy protocol
There the DTLS ciphersuite and DTLS version are negotiated and
we cannot accurately predict the actual tunnel size. In that
case the client must rely on the Base-MTU.
2016-09-14 13:12:05 +02:00
Nikos Mavrogiannopoulos
c3c54cd958 ocspasswd: compile with LIBGNUTLS_CFLAGS 2016-09-14 11:29:08 +02:00
Nikos Mavrogiannopoulos
646449743c added defs.h containing definitions from vpn.h
These are the definitions used by common/ library and
a split from vpn.h to reduce the dependencies (in headers)
to common library.
2016-09-14 11:18:35 +02:00
Nikos Mavrogiannopoulos
cc1dbf1c24 seccomp: added getrandom() to the accepted list of calls 2016-09-14 10:20:44 +02:00
Nikos Mavrogiannopoulos
58b447c413 Use a macro for the DTLS-PSK protocol indicator
Also corrected its usage in worker-http
2016-09-13 14:09:59 +02:00
Nikos Mavrogiannopoulos
b0dcea76ca Modified the X-DTLS-CipherSuite parameter for PSK to PSK-NEGOTIATE
This was changed so that it is explicitly made incompatible with
existing openconnect patch. The new openconnect client patch for
PSK negotiation is incompatible with the protocol as implemented
in 0.11.4 and requires the option match-tls-and-dtls-ciphers for its
openssl variant.
2016-09-13 13:41:46 +02:00
Nikos Mavrogiannopoulos
555d2cb03e Added the match-tls-and-dtls-ciphers config option
That when enable, it will prevent any DTLS negotiation other than the
DTLS-PSK, and will ensure that the cipher/mac combination matches on
the TLS and DTLS connections. The cisco-client-compat config option
when disabled, it will disable the pre-draft-DTLS negotiation.
2016-09-13 13:25:35 +02:00
Nikos Mavrogiannopoulos
32d1bafece doc update 2016-08-27 16:51:09 +02:00
Nikos Mavrogiannopoulos
a581d0babb removed support for chacha20-poly1305 using the legacy protocol 2016-08-05 09:08:58 +02:00
Nikos Mavrogiannopoulos
b5f5f2a0c0 Enhanced the openconnect protocol DTLS negotiation
If the client's X-DTLS-CipherSuite contains the PSK keyword,
the server will reply with "X-DTLS-CipherSuite: PSK" and will enable
DTLS-PSK negotiation on the DTLS channel. The ciphersuite set
in the DTLS channel, must match the one set in TLS one. That,
makes the protocol consistent in security properties (DTLS and TLS channel
will match cipher/mac combinations), and allows the protocol to use
any new DTLS versions, as well as new DTLS ciphersuites without
any code changes.

That change still requires to client to pretend it is resuming
by setting in the DTLS client hello the session ID provided by
X-DTLS-Session-ID.
2016-08-05 09:07:11 +02:00
Nikos Mavrogiannopoulos
5a0c6caf65 improved config macro CHECK_TRUE 2016-08-04 08:05:37 +02:00
Nikos Mavrogiannopoulos
982348df88 Reworked MTU discovery
Disable MTU discovery when not requested, set the minimum packet size
to 1280 for IPv6 and 800 bytes for IPv4. When MTU discovery fails to
calculate an MTU over the minimum, it disables itself and ocserv will rely
on packet fragmentation. This also enhances DTLS connection detection
(due to MTU issues), by setting the DPD packet size to equal to the current
data MTU.
2016-08-04 07:57:37 +02:00
Nikos Mavrogiannopoulos
22d285949c update the IP and the proc table hashes when updating the proxy protocol IP
This prevents stray pointers to the replaced IP being present in the
proc hash table.
2016-08-01 12:01:42 +02:00
Nikos Mavrogiannopoulos
37a369aec6 ocsignal: memset to zero the new sigaction 2016-07-26 13:32:40 +02:00
Nikos Mavrogiannopoulos
99c9b6749b recv_from_new_fd: changed to unsigned type 2016-07-19 11:35:24 +02:00
Nikos Mavrogiannopoulos
2ffd80509d recv_from_new_fd: update tmsg pointer
This addresses issue where tmsg was free'd by the dtls_pull
function, and free'd again by the caller of recv_from_new_fd.
2016-07-19 11:27:19 +02:00
Nikos Mavrogiannopoulos
c346f29860 worker: use the main buffer for receiving commands from main
This avoids large stack allocations.
2016-07-19 11:24:45 +02:00