strongswan.git
5 years agolibpttls: Link against ws_w32 on Windows
Martin Willi [Wed, 8 Jan 2014 10:07:01 +0000 (11:07 +0100)]
libpttls: Link against ws_w32 on Windows

5 years agolibtnccs: Link against ws_w32 on Windows
Martin Willi [Wed, 8 Jan 2014 10:06:50 +0000 (11:06 +0100)]
libtnccs: Link against ws_w32 on Windows

5 years agolibtls: Link against ws_w32 on Windows
Martin Willi [Wed, 8 Jan 2014 10:06:18 +0000 (11:06 +0100)]
libtls: Link against ws_w32 on Windows

5 years agobus: Build syslog logger depending on syslog() availability
Martin Willi [Wed, 8 Jan 2014 10:28:49 +0000 (11:28 +0100)]
bus: Build syslog logger depending on syslog() availability

5 years agowindows: Include for Vista instead of defining CondVar/SRWLock functions ourself
Martin Willi [Thu, 2 Jan 2014 17:14:51 +0000 (18:14 +0100)]
windows: Include for Vista instead of defining CondVar/SRWLock functions ourself

5 years agowindows: Don't redeclare inet_ntop/pton if already defined
Martin Willi [Thu, 2 Jan 2014 14:20:14 +0000 (15:20 +0100)]
windows: Don't redeclare inet_ntop/pton if already defined

5 years agowindows: Check for existence of error codes before defining them
Martin Willi [Thu, 2 Jan 2014 13:34:00 +0000 (14:34 +0100)]
windows: Check for existence of error codes before defining them

5 years agowindows: Check for clock_gettime() function itself as well
Martin Willi [Thu, 2 Jan 2014 13:30:45 +0000 (14:30 +0100)]
windows: Check for clock_gettime() function itself as well

CLOCK_THREAD_CPUTIME_ID seems to be defined sometimes even if clock_gettime() is
missing.

5 years agowindows: Overload sleep() cancellable when it is defined in <unistd.h>
Martin Willi [Thu, 2 Jan 2014 13:29:35 +0000 (14:29 +0100)]
windows: Overload sleep() cancellable when it is defined in <unistd.h>

5 years agosqlite: Avoid name clash when building on Windows
Martin Willi [Mon, 2 Dec 2013 10:36:34 +0000 (11:36 +0100)]
sqlite: Avoid name clash when building on Windows

5 years agomysql: Add Windows support
Martin Willi [Fri, 22 Nov 2013 08:08:09 +0000 (09:08 +0100)]
mysql: Add Windows support

As the mysql_config script is not available for Windows, we use a hardcoded
library name and no additional CFLAGS. This builds fine against the binary
MySQL Connector/C distribution.

5 years agocharon-svc: Implement a Windows IKE service using libcharon
Martin Willi [Tue, 29 Oct 2013 16:33:33 +0000 (17:33 +0100)]
charon-svc: Implement a Windows IKE service using libcharon

The resulting binary can be either run as Windows service or directly as
console application.

5 years agolibcharon: Link against Winsock2 on Windows
Martin Willi [Tue, 29 Oct 2013 09:59:08 +0000 (10:59 +0100)]
libcharon: Link against Winsock2 on Windows

5 years agofilelog: Ignore flush_line option if setlinebuf() not supported
Martin Willi [Tue, 29 Oct 2013 09:58:39 +0000 (10:58 +0100)]
filelog: Ignore flush_line option if setlinebuf() not supported

5 years agowindows: Provide a close(2) that can close both file handles and sockets
Martin Willi [Thu, 21 Nov 2013 15:27:21 +0000 (16:27 +0100)]
windows: Provide a close(2) that can close both file handles and sockets

5 years agochunk: Fallback to recv() on Windows chunk_from_fd() when operating on socket
Martin Willi [Thu, 21 Nov 2013 15:27:50 +0000 (16:27 +0100)]
chunk: Fallback to recv() on Windows chunk_from_fd() when operating on socket

5 years agowindows: Don't use function macros to overload send/recv() and friends
Martin Willi [Tue, 29 Oct 2013 09:48:09 +0000 (10:48 +0100)]
windows: Don't use function macros to overload send/recv() and friends

While the macro versions would not catch non-function invocations, we actually
have to use catch all to support the sender_t.send() function.

5 years agocontroller: Remove unused <dlfcn.h> include
Martin Willi [Tue, 29 Oct 2013 09:47:36 +0000 (10:47 +0100)]
controller: Remove unused <dlfcn.h> include

5 years agocharon: Don't use syslog() if not supported
Martin Willi [Tue, 29 Oct 2013 09:46:30 +0000 (10:46 +0100)]
charon: Don't use syslog() if not supported

5 years agoencoding: Don't explicitly include <arpa/inet.h>
Martin Willi [Tue, 29 Oct 2013 09:45:43 +0000 (10:45 +0100)]
encoding: Don't explicitly include <arpa/inet.h>

5 years agopayload: Use common prefixes for all payload type identifiers
Martin Willi [Tue, 29 Oct 2013 09:09:39 +0000 (10:09 +0100)]
payload: Use common prefixes for all payload type identifiers

The old identifiers did not use a proper namespace and often clashed with
other defines.

5 years agowindows: Never link to libpthread
Martin Willi [Wed, 6 Nov 2013 10:17:01 +0000 (11:17 +0100)]
windows: Never link to libpthread

5 years agoopenssl: Fix includes to prevent <winsock2.h> to complain about include order
Martin Willi [Fri, 25 Oct 2013 15:30:27 +0000 (17:30 +0200)]
openssl: Fix includes to prevent <winsock2.h> to complain about include order

5 years agoopenssl: Undef OpenSSLs X509_NAME defined by <wincrypt.h>
Martin Willi [Fri, 25 Oct 2013 15:29:31 +0000 (17:29 +0200)]
openssl: Undef OpenSSLs X509_NAME defined by <wincrypt.h>

5 years agoopenssl: Check and link against libeay32 instead of libcrypto on Windows
Martin Willi [Fri, 25 Oct 2013 15:28:13 +0000 (17:28 +0200)]
openssl: Check and link against libeay32 instead of libcrypto on Windows

Most Windows OpenSSL builds come with the crypto library named libeay32.

5 years agowindows: Provide a strndup(3) replacement
Martin Willi [Fri, 25 Oct 2013 14:41:48 +0000 (16:41 +0200)]
windows: Provide a strndup(3) replacement

5 years agosha1: Include <library.h> instead of directly including <arpa/inet.h>
Martin Willi [Fri, 25 Oct 2013 14:41:04 +0000 (16:41 +0200)]
sha1: Include <library.h> instead of directly including <arpa/inet.h>

On Windows we don't have <arpa/inet.h>

5 years agox509: Undef OCSP_RESPONSE from <wincrypt.h> before using it
Martin Willi [Fri, 25 Oct 2013 14:40:32 +0000 (16:40 +0200)]
x509: Undef OCSP_RESPONSE from <wincrypt.h> before using it

5 years agoplugins: Don't link with -rdynamic on Windows
Martin Willi [Fri, 25 Oct 2013 14:03:47 +0000 (16:03 +0200)]
plugins: Don't link with -rdynamic on Windows

5 years agounit-tests: Uninline dlopen() and friends, make more dynamic, fix dlerror()
Martin Willi [Fri, 25 Oct 2013 14:03:07 +0000 (16:03 +0200)]
unit-tests: Uninline dlopen() and friends, make more dynamic, fix dlerror()

As the error string contains a newline, we have to remove that before
returning the string.

5 years agothread-value: Immediately cleanup all Windows TLS values on destroy
Martin Willi [Fri, 6 Dec 2013 10:33:40 +0000 (11:33 +0100)]
thread-value: Immediately cleanup all Windows TLS values on destroy

5 years agowindows: Prevent queueing of multiple thread cancel APCs
Martin Willi [Wed, 28 May 2014 15:34:48 +0000 (17:34 +0200)]
windows: Prevent queueing of multiple thread cancel APCs

This avoids any races during cleanup invocation if multiple cancel() requests
come in.

5 years agowindows: Provide a complete native Windows threading backend
Martin Willi [Mon, 21 Oct 2013 16:07:51 +0000 (18:07 +0200)]
windows: Provide a complete native Windows threading backend

5 years agowindows: Provide a cancellable usleep(), but with ms resolution only
Martin Willi [Wed, 23 Oct 2013 13:50:10 +0000 (15:50 +0200)]
windows: Provide a cancellable usleep(), but with ms resolution only

5 years agowindows: Add a sleep function acting as cancellation point
Martin Willi [Mon, 21 Oct 2013 14:58:54 +0000 (16:58 +0200)]
windows: Add a sleep function acting as cancellation point

5 years agowindows: Provide a sched_yield() implementation
Martin Willi [Wed, 23 Oct 2013 14:44:14 +0000 (16:44 +0200)]
windows: Provide a sched_yield() implementation

5 years agolibipsec: Avoid name clash with sched.h clone()
Martin Willi [Mon, 10 Mar 2014 16:06:57 +0000 (17:06 +0100)]
libipsec: Avoid name clash with sched.h clone()

5 years agowindows: Provide a time_monotonic() based on GetTickCount64()
Martin Willi [Fri, 18 Oct 2013 12:19:32 +0000 (14:19 +0200)]
windows: Provide a time_monotonic() based on GetTickCount64()

5 years agolibrary: Change init/deinit order to allow utils to depend on threading
Martin Willi [Mon, 21 Oct 2013 11:00:29 +0000 (13:00 +0200)]
library: Change init/deinit order to allow utils to depend on threading

5 years agochunk: Don't depend on pthread directly
Martin Willi [Fri, 18 Oct 2013 13:04:55 +0000 (15:04 +0200)]
chunk: Don't depend on pthread directly

5 years agoutils: Don't directly depend on pthread
Martin Willi [Wed, 28 May 2014 10:17:15 +0000 (12:17 +0200)]
utils: Don't directly depend on pthread

5 years agostrerror: Don't directly depend on pthread
Martin Willi [Wed, 28 May 2014 10:15:10 +0000 (12:15 +0200)]
strerror: Don't directly depend on pthread

5 years agowindows: Link libhydra against Winsock2
Martin Willi [Thu, 17 Oct 2013 15:12:34 +0000 (17:12 +0200)]
windows: Link libhydra against Winsock2

5 years agowindows: Provide a strdup variant safe when passing zero-length strings
Martin Willi [Thu, 17 Oct 2013 14:23:43 +0000 (16:23 +0200)]
windows: Provide a strdup variant safe when passing zero-length strings

5 years agounit-tests: Don't test Unix socket stream/services on Windows
Martin Willi [Thu, 17 Oct 2013 13:09:17 +0000 (15:09 +0200)]
unit-tests: Don't test Unix socket stream/services on Windows

5 years agounit-tests: Use send/recv on socket in watcher tests
Martin Willi [Wed, 16 Oct 2013 17:32:15 +0000 (19:32 +0200)]
unit-tests: Use send/recv on socket in watcher tests

Windows does not support read/write on sockets.

5 years agostream: Separate TCP/Unix stream helpers from stream/service implementations
Martin Willi [Fri, 11 Oct 2013 13:32:10 +0000 (15:32 +0200)]
stream: Separate TCP/Unix stream helpers from stream/service implementations

This allows us to disable Unix sockets cleanly on Windows. Replaces some
read/write calls with recv/send counterparts, as Winsock does not like
read/writes.

5 years agowatcher: Add Windows support
Martin Willi [Thu, 17 Oct 2013 09:56:15 +0000 (11:56 +0200)]
watcher: Add Windows support

Instead of a pipe we use a TCP socketpair (can't select() a _pipe()), and
Windsock2 send/recv functions instead of read/write.

Currently supported (and required) are file descriptors provided by Winsock
only; we might use a separate mechanism for traditional file handles if
required (or switch to Windows events and WaitForMultipleObjects) for a future
version.

5 years agowindows: Map WSAGetLastError() to errno failures in wrapped send/recv/from/to
Martin Willi [Thu, 17 Oct 2013 09:32:48 +0000 (11:32 +0200)]
windows: Map WSAGetLastError() to errno failures in wrapped send/recv/from/to

5 years agowindows: Add send/recv and sendto/recvfrom wrappers supporting MSG_DONTWAIT
Martin Willi [Wed, 16 Oct 2013 16:31:24 +0000 (18:31 +0200)]
windows: Add send/recv and sendto/recvfrom wrappers supporting MSG_DONTWAIT

5 years agowindows: Implement socketpair() using TCP sockets
Martin Willi [Wed, 16 Oct 2013 15:44:32 +0000 (17:44 +0200)]
windows: Implement socketpair() using TCP sockets

5 years agowindows: Add utils_init/deinit functions to initialize Winsock2
Martin Willi [Wed, 16 Oct 2013 15:27:19 +0000 (17:27 +0200)]
windows: Add utils_init/deinit functions to initialize Winsock2

5 years agowindows: Provide a setenv() wrapper
Martin Willi [Tue, 15 Oct 2013 16:27:27 +0000 (18:27 +0200)]
windows: Provide a setenv() wrapper

5 years agounit-tests: Use Windows path for chunk tests, and socket functions if required
Martin Willi [Thu, 21 Nov 2013 15:26:18 +0000 (16:26 +0100)]
unit-tests: Use Windows path for chunk tests, and socket functions if required

5 years agounit-tests: Don't depend on sockaddr_un to test invalid host_t family
Martin Willi [Tue, 15 Oct 2013 16:12:39 +0000 (18:12 +0200)]
unit-tests: Don't depend on sockaddr_un to test invalid host_t family

5 years ago.gitignore: Add Windows .exe files
Martin Willi [Tue, 15 Oct 2013 16:09:06 +0000 (18:09 +0200)]
.gitignore: Add Windows .exe files

5 years agounit-tests: Add support for Windows build
Martin Willi [Tue, 15 Oct 2013 15:40:58 +0000 (17:40 +0200)]
unit-tests: Add support for Windows build

Instead of signals we catch Windows exceptions. Currently not supported are
timers, which is more a convenience thing anyway.

5 years agowindows: Fix up PRI* printf formatters when building against own backend
Martin Willi [Tue, 15 Oct 2013 15:40:06 +0000 (17:40 +0200)]
windows: Fix up PRI* printf formatters when building against own backend

5 years agowindows: Use localtime/gmtime to implement _r variants
Martin Willi [Tue, 15 Oct 2013 14:23:44 +0000 (16:23 +0200)]
windows: Use localtime/gmtime to implement _r variants

The _s variants and friends do not seem to work on Windows 7 and always fail.

5 years agoasn1: Return a zeroed ASN1 time if gmtime_r() conversion fails
Martin Willi [Tue, 15 Oct 2013 14:11:19 +0000 (16:11 +0200)]
asn1: Return a zeroed ASN1 time if gmtime_r() conversion fails

5 years agoutils: Printf() defined time output should gmtime/localtime_r() fail
Martin Willi [Tue, 15 Oct 2013 14:10:05 +0000 (16:10 +0200)]
utils: Printf() defined time output should gmtime/localtime_r() fail

5 years agobacktrace: Inline esc() helper, making it available to all build variants
Martin Willi [Thu, 2 Jan 2014 13:33:32 +0000 (14:33 +0100)]
backtrace: Inline esc() helper, making it available to all build variants

5 years agobacktrace: Support backtraces on Windows without DbgHelp
Martin Willi [Tue, 19 Nov 2013 17:40:51 +0000 (18:40 +0100)]
backtrace: Support backtraces on Windows without DbgHelp

While DbgHelp provides a convenient API to create backtraces, any executable
linking against DbgHelp gets a more than a significant slow down. Further, it
can only lookup global symbols, as it expects PDB files we can't produce with a
MinGW build.

With some core Kernel32.dll functionality, we can capture stack traces much
faster. Together with the optional libbfd, we can print very fine backtraces.

When --enable-bfd-backtraces is used on Windows, a libbfd.dll is required for
the build. Such a DLL can be created from the binutils sources using:

  # build binutils with mingw...

  # extract archive members from binutils libraries
  x86_64-w64-mingw32-ar x $BINUTILS/bfd/.libs/libbfd.a
  x86_64-w64-mingw32-ar x $BINUTILS/intl/libintl.a
  x86_64-w64-mingw32-ar x $BINUTILS/libiberty/libiberty.a

  # create self-contained libbfd.a, with index
  x86_64-w64-mingw32-ar qs libbfd.a *.o

  # create DLL from static library
  x86_64-w64-mingw32-dlltool -e libbfd.o -l libbfd.lib libbfd.a
  x86_64-w64-mingw32-gcc -shared libbfd.a libbfd.o -o libbfd.dll

5 years agobacktrace: Add DbgHelp based Windows support for creating/printing backtraces
Martin Willi [Mon, 14 Oct 2013 09:55:12 +0000 (11:55 +0200)]
backtrace: Add DbgHelp based Windows support for creating/printing backtraces

5 years agoprintf-hook-builtin: Support Windows console colors using TTY escape codes
Martin Willi [Tue, 15 Oct 2013 13:45:11 +0000 (15:45 +0200)]
printf-hook-builtin: Support Windows console colors using TTY escape codes

5 years agowindows: Link libstrongswan against ws2_32.dll
Martin Willi [Fri, 11 Oct 2013 16:03:47 +0000 (18:03 +0200)]
windows: Link libstrongswan against ws2_32.dll

5 years agocapabilities: Add build support for Windows
Martin Willi [Fri, 11 Oct 2013 15:48:33 +0000 (17:48 +0200)]
capabilities: Add build support for Windows

We might extend it in the future using some Windows rights management.

5 years agowindows: Use _getmaxstdio as replacement for syscall(_SC_OPEN_MAX)
Martin Willi [Fri, 11 Oct 2013 15:27:25 +0000 (17:27 +0200)]
windows: Use _getmaxstdio as replacement for syscall(_SC_OPEN_MAX)

5 years agowindows: replace mkdir() with Windows _mkdir() variant
Martin Willi [Fri, 11 Oct 2013 15:26:35 +0000 (17:26 +0200)]
windows: replace mkdir() with Windows _mkdir() variant

5 years agothread: Add a Windows pthread variant to print thread identifiers
Martin Willi [Fri, 11 Oct 2013 15:14:04 +0000 (17:14 +0200)]
thread: Add a Windows pthread variant to print thread identifiers

5 years agowindows: Provide wrappers for dlopen() function family
Martin Willi [Fri, 11 Oct 2013 14:58:02 +0000 (16:58 +0200)]
windows: Provide wrappers for dlopen() function family

5 years agocrl: Undefine <wincrypt.h>'s CRL_REASON_* and use our enum values instead
Martin Willi [Fri, 11 Oct 2013 13:59:37 +0000 (15:59 +0200)]
crl: Undefine <wincrypt.h>'s CRL_REASON_* and use our enum values instead

5 years agotun-device: Rearrange headers to build properly when tun devices not supported
Martin Willi [Fri, 11 Oct 2013 13:43:30 +0000 (15:43 +0200)]
tun-device: Rearrange headers to build properly when tun devices not supported

5 years agoconfigure.ac: Define USE_WINDOWS for Automake when building for Windows
Martin Willi [Fri, 11 Oct 2013 13:26:01 +0000 (15:26 +0200)]
configure.ac: Define USE_WINDOWS for Automake when building for Windows

5 years agowindows: Add a common Windows header for platform specific wrappers
Martin Willi [Fri, 11 Oct 2013 12:45:56 +0000 (14:45 +0200)]
windows: Add a common Windows header for platform specific wrappers

Include some more basic system headers in utils.h, so we can use that common
header on the different platforms.

5 years agoimv-swid: Cast json object strings when using it as chunk pointer
Martin Willi [Tue, 3 Jun 2014 10:20:28 +0000 (12:20 +0200)]
imv-swid: Cast json object strings when using it as chunk pointer

While the string is actually const, we don't have a const chunk to handle such
strings properly in chunks. Fixes compiler warnings.

5 years agotravis: Install libjson dependency for "all" tests
Martin Willi [Tue, 3 Jun 2014 08:16:33 +0000 (10:16 +0200)]
travis: Install libjson dependency for "all" tests

5 years agotesting: Cache packages downloaded with pip for strongTNC
Tobias Brunner [Mon, 2 Jun 2014 15:45:42 +0000 (17:45 +0200)]
testing: Cache packages downloaded with pip for strongTNC

This way no network connections is required to rebuild the root/guest images.

5 years agoFirst swanctl scenario 5.2.0dr5
Andreas Steffen [Sun, 1 Jun 2014 19:12:15 +0000 (21:12 +0200)]
First swanctl scenario

5 years agoAdded SWID IMV REST API implementation to NEWS
Andreas Steffen [Sat, 31 May 2014 18:52:37 +0000 (20:52 +0200)]
Added SWID IMV REST API implementation to NEWS

5 years agoAllow large lines output by swid_generator to be processed
Andreas Steffen [Sat, 31 May 2014 18:33:19 +0000 (20:33 +0200)]
Allow large lines output by swid_generator to be processed

5 years agoMake REST POST request timeout configurable
Andreas Steffen [Sat, 31 May 2014 18:29:21 +0000 (20:29 +0200)]
Make REST POST request timeout configurable

5 years agoTest SWID REST API ins tnc/tnccs-20-pdp scenarios
Andreas Steffen [Sat, 31 May 2014 18:23:15 +0000 (20:23 +0200)]
Test SWID REST API ins tnc/tnccs-20-pdp scenarios

5 years agoDetect RADIUS packet retransmissions
Andreas Steffen [Sat, 31 May 2014 18:19:12 +0000 (20:19 +0200)]
Detect RADIUS packet retransmissions

5 years agoUpdated IMC/IMV entries in strongswan.conf man page
Andreas Steffen [Fri, 30 May 2014 08:00:08 +0000 (10:00 +0200)]
Updated IMC/IMV entries in strongswan.conf man page

5 years agoMigration from Debian 7.4 to 7.5
Andreas Steffen [Fri, 30 May 2014 07:31:59 +0000 (09:31 +0200)]
Migration from Debian 7.4 to 7.5

5 years agoFixed swid_generator interface
Andreas Steffen [Fri, 30 May 2014 07:29:56 +0000 (09:29 +0200)]
Fixed swid_generator interface

5 years agoDetect oversize SWID tags
Andreas Steffen [Thu, 29 May 2014 11:05:39 +0000 (13:05 +0200)]
Detect oversize SWID tags

5 years agomax_attr_size is an uint32_t value
Andreas Steffen [Thu, 29 May 2014 11:04:30 +0000 (13:04 +0200)]
max_attr_size is an uint32_t value

5 years agoUpdate of Ubuntu 14.04 kernel
Andreas Steffen [Wed, 28 May 2014 13:21:43 +0000 (15:21 +0200)]
Update of Ubuntu 14.04 kernel

5 years agoWait for the arrival of the TCPG_PTS_DH_NONCE_PARAMS_RESP
Andreas Steffen [Tue, 27 May 2014 19:15:12 +0000 (21:15 +0200)]
Wait for the arrival of the TCPG_PTS_DH_NONCE_PARAMS_RESP

5 years agoIncreased maximum PT-TLS message size to 2MB
Andreas Steffen [Tue, 27 May 2014 17:36:36 +0000 (19:36 +0200)]
Increased maximum PT-TLS message size to 2MB

5 years agolog SWID tags and tag IDs on debug level 3
Andreas Steffen [Tue, 27 May 2014 17:29:16 +0000 (19:29 +0200)]
log SWID tags and tag IDs on debug level 3

5 years agoAutomatic determination of maximum PB-TNC batch and PA-TNC message size
Andreas Steffen [Tue, 27 May 2014 17:03:49 +0000 (19:03 +0200)]
determination of maximum PB-TNC batch and PA-TNC message size

5 years agoCompleted the command line options of the pt-tls-client
Andreas Steffen [Tue, 27 May 2014 17:02:36 +0000 (19:02 +0200)]
Completed the command line options of the pt-tls-client

5 years agoSplit TCG SWID Request attribute into chunks if needed
Andreas Steffen [Mon, 26 May 2014 07:36:31 +0000 (09:36 +0200)]
Split TCG SWID Request attribute into chunks if needed

5 years agoCheck for libjson
Andreas Steffen [Mon, 26 May 2014 05:51:44 +0000 (07:51 +0200)]
Check for libjson

5 years agoAdded Debian 7.5 product and all Debian armv6l products
Andreas Steffen [Sun, 25 May 2014 15:58:36 +0000 (17:58 +0200)]
Added Debian 7.5 product and all Debian armv6l products

5 years agoFixed typo in tables.sql
Andreas Steffen [Sun, 25 May 2014 15:58:00 +0000 (17:58 +0200)]
Fixed typo in tables.sql

5 years agoAdditional index to improve performance
Andreas Steffen [Sat, 24 May 2014 10:26:20 +0000 (12:26 +0200)]
Additional index to improve performance