Commit Graph

12404 Commits

Author SHA1 Message Date
Andreas Steffen 1d252e9dec Version bump to 5.1.2 2014-02-27 22:46:52 +01:00
Andreas Steffen 2bb793f131 Optimized initialisation of indices 2014-02-27 22:39:47 +01:00
Andreas Steffen 222b88a302 Added get_array() method to ntru_poly_t class 2014-02-27 22:08:22 +01:00
Andreas Steffen d12a4a67bf Defined ntru_poly_create_from_seed() and ntru_poly_create_from_data() constructors and built some unit tests for the latter) 2014-02-27 20:36:17 +01:00
Andreas Steffen f87f28ec68 Optimized use of temporary arrays in polynomial multiplication 2014-02-27 15:22:59 +01:00
Andreas Steffen bf24960cbe Implement ring multiplication method 2014-02-27 15:22:58 +01:00
Tobias Brunner bd1c9f1eac conf: Fix out-of-tree build from distribution
It worked from the repository, where strongswan.conf.5.main is generated
in the build dir, but not from the distribution where it is located in
the source dir, so explicitly create it in the source dir.
2014-02-27 12:02:13 +01:00
Tobias Brunner 2ed241aeb3 utils: Add memrchr(3) replacement for platforms that don't support it
For instance, on Mac OS X memrchr(3) is not provided by the C library.
2014-02-26 11:05:07 +01:00
Tobias Brunner 625fc60154 Merge branch 'dirname'
Fixes the incorrect usage of dirname(3) in settings_t and stroke_cred_t,
and adds thread-safe variants of dirname(3) and basename(3).
2014-02-24 12:04:24 +01:00
Tobias Brunner 6b895d7b25 libpts: Use path_base|dirname() 2014-02-24 12:04:11 +01:00
Tobias Brunner 9222d58634 conftest: Use path_dirname() 2014-02-24 12:04:11 +01:00
Tobias Brunner 849e401b37 stroke: Use thread-safe dirname(3) 2014-02-24 12:04:11 +01:00
Tobias Brunner 18019a3b89 settings: Use thread-safe dirname(3) 2014-02-24 12:04:11 +01:00
Tobias Brunner 766141bc77 utils: Add thread-safe variants of dirname(3) and basename(3) 2014-02-24 12:04:11 +01:00
Tobias Brunner ba10cd3c7f utils: Move thread-safe strerror replacement to a separate file
For some utils _GNU_SOURCE might be needed but that conflicts with the
signature of strerror_r(3).
2014-02-24 12:04:10 +01:00
Tobias Brunner aa693d763a stroke: Use dirname(3) correctly 2014-02-24 12:04:10 +01:00
Tobias Brunner caf1770905 settings: Use dirname(3) correctly
dirname(3) may return a pointer to a statically allocated buffer.
So freeing the returned value can result to undefined behavior. This was
noticed on FreeBSD where it caused very strange crashes.

It is also not thread-safe, which will be addressed later.
2014-02-24 12:03:49 +01:00
Andreas Steffen a21d4096e5 Use logical AND function 2014-02-23 16:44:32 +01:00
Martin Willi 1c667bce3f pki: Make cmds array static, ensuring that it is zero-initialized
As pki --help relies on a zero-terminated array, make the actually non-public
cmds array static to ensure initialization.
2014-02-20 11:45:51 +01:00
Andreas Steffen e80014f1e8 index limit can be easily computed 2014-02-19 20:18:53 +01:00
Tobias Brunner ab13364c65 uclibc only defines strndup(3) if _GNU_SOURCE is defined
References #516.
2014-02-19 16:11:47 +01:00
Tobias Brunner 09417da49c sshkey: uclibc only defines fmemopen(3) if _GNU_SOURCE is defined
Fixes #516.
2014-02-19 15:55:20 +01:00
Tobias Brunner 6122bfd2eb coverage: Apparently not all shells can expand {src,scripts}
One example is ash.
2014-02-19 15:53:59 +01:00
Tobias Brunner 435aed8287 pki: Fix minor resource leak on failure to read the private key in --req 2014-02-18 16:46:25 +01:00
Tobias Brunner 5a04056295 stroke: Use proper modifiers to print size_t arguments 2014-02-18 16:46:25 +01:00
Andreas Steffen 6dd05e0d58 Created ntru_poly class for sparse trinary polynomials 2014-02-18 16:17:38 +01:00
Tobias Brunner 65ee857a88 android: Don't limit number to packets during EAP-TTLS 2014-02-18 11:32:37 +01:00
Tobias Brunner 7867ae42ab lookip: Properly return from disconnect callback job
References #518.
2014-02-18 11:21:51 +01:00
Tobias Brunner 21cfbce0c2 Doxygen: Sort group names alphabetically 2014-02-18 10:45:51 +01:00
Tobias Brunner 4ab38d98a7 Fixed some typos 2014-02-18 10:36:25 +01:00
Tobias Brunner 86865da388 plugin-loader: Escape <ns> in comment as Doxygen sees this as XML tag 2014-02-18 10:18:54 +01:00
Tobias Brunner 1281c297d9 unit-tests: Ignore tests not test_runner 2014-02-18 10:09:30 +01:00
Tobias Brunner e1af4d88a6 conf: Ignore generated strongswan.conf.5.main 2014-02-18 10:08:54 +01:00
Andreas Steffen a334ac80ae Added ikev2/lookip scenario 2014-02-17 12:04:21 +01:00
Andreas Steffen 8f57961f4c Version bump to 5.1.2rc2 2014-02-17 12:02:23 +01:00
Martin Willi 961409b668 lookip: Disconnect asynchronously to avoid dead-locking watcher unregistration
While it really would be desirable to allow stream destruction during on_read()
callbacks, this does not work anymore since e49b2998. Until we have a proper
solution for this issue, use asynchronous disconnects for the only user doing
so.

Fixes #518.
2014-02-17 09:48:55 +01:00
Andreas Steffen 1f9e4d029e Fixed a minor vulnerability in which a malformed ASN.1 length field could cause a crash of the charon daemon if the verbose debug level 3 (raw hex dump) for the asn subsystem is enabled. 2014-02-14 15:06:57 +01:00
Tobias Brunner 5645ad2976 conf: Fix installation on FreeBSD
Apparently, the -t option for install is not portable.
2014-02-13 13:53:25 +01:00
Andreas Steffen f03441c4dd pacman.sh creates /etc/pts/dists directory if it doesn't exist yet 2014-02-13 13:21:47 +01:00
Tobias Brunner c2d5add6ce NEWS: Add strongswan.conf changes and IPComp fixes 2014-02-13 11:47:13 +01:00
Tobias Brunner 03650d5a2d conf: The use of $^ is not portable
Generating strongswan.conf.5.main in a subshell gets the file
properly written to the builddir in out-of-tree builds.
2014-02-13 11:47:02 +01:00
Tobias Brunner 6477e64a8d printf-hook-glibc: printf.h on FreeBSD 10 does not include stdargs.h 2014-02-13 10:46:52 +01:00
Tobias Brunner 593251fcf6 array: Fix compilation on FreeBSD 2014-02-13 10:46:46 +01:00
Tobias Brunner 5501503618 Merge branch 'modular-load'
Introduces a new configuration file layout. strongswan.conf is now only
very simple and mainly includes the config snippets from the strongswan.d
and strongswan.d/charon directories (the latter containing snippets for
individual plugins).

Config snippets with commented defaults are generated for all currently
defined settings and are installed if they don't exist yet and the
respective plugin/component is enabled.  Similarly, the strongswan.conf(5)
man page, which documents all these settings, is automatically generated
from the same source.
The config snippets are also installed in $prefix/share/strongswan so
existing files can be compared to the most current defaults.

As an alternative to the non-extensible charon.load option, the plugins
to load can now be determined via the respective charon.plugins.<name>.load
setting.  This functionality is enabled by the new default strongswan.conf
file (via the charon.load_modular option) and the load setting in the
generated config snippets of all enabled plugins.  The load setting
optionally takes a numeric priority value that allows reordering the
plugins (plugins with the same priority are ordered according to the
default plugin order).

Additionally, all settings that were formerly defined in library
specific "global" sections are now application specific.  For instance,
instead of configuring libstrongswan.plugins.random.random and affecting
charon, charon-cmd, pki, basically every application using libstrongswan,
the option can now be set individually for each application (e.g.
pki.plugins.random.random to affect only pki).  The old options are still
supported though, which actually allows to define defaults for all
applications in the libstrongswan section.

The libtls options are mapped to <app>.tls. The libimcv and libtnccs options
are mapped to <app>.imcv and <app>.tnc, respectively (while their plugin's
options are now under <app>.plugins together with all the others).

Fixes #475.
2014-02-12 15:51:42 +01:00
Tobias Brunner efce4559e8 conf: Install config files world-readable but warn about permissions for certain options 2014-02-12 15:16:57 +01:00
Tobias Brunner 5422bb9070 conf: Document variables and config files/dirs 2014-02-12 14:34:34 +01:00
Tobias Brunner 07d971ef22 Add Python and pkg-config as requirements to HACKING
pkg-config is probably installed on most systems by default, but e.g. not
on Cygwin.
2014-02-12 14:34:34 +01:00
Tobias Brunner 7573a7ed56 conf: Only install config snippets for enabled components 2014-02-12 14:34:34 +01:00
Tobias Brunner ff94fe157a conf: Document options of other programs 2014-02-12 14:34:34 +01:00
Tobias Brunner 5ac757872b conf: Document options of plugins in libpts 2014-02-12 14:34:34 +01:00