Commit Graph

261 Commits

Author SHA1 Message Date
Tobias Brunner 4a0b6d659d Add plugin constructor registration for all libraries that provide plugins
Unfortunately, we can't just add the generated C file to the sources in
Makefile.am as the linker would remove that object file when it notices
that no symbol in it is ever referenced.  So we include it in the file
that contains the library initialization, which will definitely be
referenced by the executable.

This allows building an almost stand-alone static version of e.g. charon
when building with `--enable-monolithic --enable-static --disable-shared`
(without `--disable-shared` libtool will only build a version that links
the libraries dynamically).  External libraries (e.g. gmp or openssl) are
not linked statically this way, though.
2017-05-23 18:29:12 +02:00
Tobias Brunner 8699275ed6 plugin-constructors: Add script to generate constructor registration
Using a Python script so this works in cross-compilation situations.
2017-05-23 18:29:12 +02:00
Martin Willi 7f9bfacd5a curve25519: Add a plugin providing Curve25519 DH using backend drivers 2016-11-14 16:20:51 +01:00
Andreas Steffen 188b190a70 mgf1: Refactored MGF1 as an XOF 2016-09-21 06:40:52 +02:00
Tobias Brunner 831425491c xof: Add header to dev headers 2016-08-29 10:40:59 +02:00
Andreas Steffen 1342bd3386 unit-tests: Created newhope unit-tests 2016-08-10 14:22:00 +02:00
Andreas Steffen 393688aea0 Created newhope plugin implementing the New Hope key exchange algorithm 2016-08-10 14:22:00 +02:00
Andreas Steffen d305f251a5 Created libnttfft
This makes Number Theoretic Transforms (NTT) based on the efficient
Fast-Fourier-Transform (FFT) available to multiple plugins.
2016-07-29 12:36:15 +02:00
Andreas Steffen 04208ac5d4 xof: Defined Extended Output Functions 2016-07-29 12:36:14 +02:00
Martin Willi 518a5b2ece configure: Check for and explicitly link against -latomic
Some C libraries, such as uClibc, require an explicit link for some atomic
functions. Check for any libatomic, and explcily link it.
2016-06-14 14:27:20 +02:00
Andreas Steffen 9dd8bfb2ce Changed some certificate_type_names and added x509_flag_names 2015-12-11 18:26:55 +01:00
Andreas Steffen 3317d0e77b Standardized printing of certificate information
The certificate_printer class allows the printing of certificate
information to a text file (usually stdout). This class is used
by the pki --print and swanctl --list-certs commands as well as
by the stroke plugin.
2015-12-11 18:26:53 +01:00
Tobias Brunner 9be6b2e0b5 android: Replace AndroidConfigLocal.h with a header in utils/compat 2015-11-12 14:10:33 +01:00
Tobias Brunner 403acf8614 crypto: Add NULL IV generator
This does not actually allocate an IV and only accepts requests
for size == 0.
2015-11-09 11:08:22 +01:00
Andreas Steffen a488584b5f Implemented SHA-3 hash algorithm including test vectors 2015-11-03 21:35:09 +01:00
Martin Willi 370fb3feb0 chapoly: Provide a generic ChaCha20/Poly1305 AEAD supporting driver backends 2015-06-29 17:32:14 +02:00
Tobias Brunner f146104736 settings: Fix out-of-tree build
The header file was created in the source directory before, where it
wasn't found by the generated C files in the build directory.
2015-06-11 12:34:55 +02:00
Martin Willi 04f12ecd29 align: Move min/max/padding/alignment functions to separate files 2015-04-16 14:50:40 +02:00
Martin Willi eaa02bc925 time: Move time related functions to separate files 2015-04-16 14:50:24 +02:00
Martin Willi 1f2326ce58 object: Move OO programming helper macros to a separate header file 2015-04-16 14:50:05 +02:00
Martin Willi 1e02eddb72 status: Move status_t type and functions to separate files 2015-04-16 14:50:05 +02:00
Martin Willi 001a22e2c1 path: Move path related utility functions to separate files 2015-04-16 14:50:04 +02:00
Martin Willi 7585a85f1a tty: Move tty related functions to separate files 2015-04-16 14:50:04 +02:00
Martin Willi 7802ab88a1 memory: Move memory manipulation related functions to separate files 2015-04-16 14:50:02 +02:00
Martin Willi bbfe7a80b1 string: Move string related utility functions to separate files 2015-04-16 14:49:19 +02:00
Martin Willi 03cf888277 byteorder: Move byte order related functions to separate header file 2015-04-16 14:49:19 +02:00
Martin Willi 95726f7617 types: Use generic type definitions to separate header file 2015-04-16 14:49:19 +02:00
Martin Willi 717313c542 atomics: Move atomics/recounting support to separate files 2015-04-16 14:49:19 +02:00
Martin Willi 78c04b5d4d aesni: Provide a plugin stub for AES-NI instruction based crypto primitives 2015-04-15 11:35:26 +02:00
Martin Willi f155880eda cpu-feature: Add a common class to query available CPU features
Currently supported is x86/x64 via cpuid() for some common features.
2015-04-13 15:31:58 +02:00
Martin Willi a4549e5525 iv-gen: Add a generic constructor to create an IV gen from an algorithm 2015-04-13 15:06:15 +02:00
Tobias Brunner 1735d80f38 files: Add simple plugin to load files from file:// URIs 2015-03-09 16:08:52 +01:00
Tobias Brunner 1d384bf8aa hash-algorithm-set: Add class to manage a set of hash algorithms 2015-03-04 13:54:11 +01:00
Tobias Brunner 700df23886 bliss: Fix monolithic build
This requires moving test files so that the Makefile for the tests can be
included after building libstrongswan, which requires the plugin when
building monolithically.  Due to this a static helper library is required
as directly referring to object files (or source files) is not possible.

It's also necessary to avoid any link-time dependency on libstrongswan in
bliss_huffman, to avoid circular dependencies (bliss_huffman -> libstrongswan
-> bliss -> bliss_huffman).
2014-12-12 12:00:20 +01:00
Andreas Steffen 37bfe44358 unit-tests: Created separate mgf1 test suite 2014-11-29 14:51:16 +01:00
Andreas Steffen 988d477145 Implemented bitspender based on the MGF1 mask generator function 2014-11-29 14:51:15 +01:00
Andreas Steffen 1d3e080877 Moved mgf1 class to libstrongswan/crypto/mgf1 2014-11-29 14:51:15 +01:00
Andreas Steffen 9d5b91d198 Created framework for BLISS post-quantum signature algorithm 2014-11-29 14:51:14 +01:00
Martin Willi 89f19ef876 windows: Move the compatibility header to the compat subfolder 2014-11-21 12:02:08 +01:00
Martin Willi f65779dd0f apple: Introduce a central compatibility header with all __APPLE__ quirks 2014-11-21 12:02:08 +01:00
Martin Willi 1fea589c1f process: Provide an abstraction to spawn child processes with redirected I/O 2014-10-06 18:24:39 +02:00
Tobias Brunner 9dbf2019e2 collections: Add interface for read-only dictionaries 2014-06-19 14:00:48 +02:00
Martin Willi 9c62511c08 windows: Link against psapi32
On some version GetModuleFileNameEx/GetModuleInformation is in psapi32 instead
of kernel32. We link to both libraries to make sure we have it.
2014-06-06 16:28:28 +02:00
Martin Willi 6f90fc8061 winhttp: Implement a http(s) fetcher based on Microsofts WinHTTP API 2014-06-04 16:34:15 +02:00
Martin Willi 0fa9c95811 windows: Provide a complete native Windows threading backend 2014-06-04 15:53:01 +02:00
Martin Willi aa5b49c037 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.
2014-06-04 15:53:00 +02:00
Martin Willi 87a79e6a03 windows: Add utils_init/deinit functions to initialize Winsock2 2014-06-04 15:52:59 +02:00
Martin Willi a7e943a640 backtrace: Add DbgHelp based Windows support for creating/printing backtraces 2014-06-04 15:52:57 +02:00
Martin Willi 71bf82d474 windows: Link libstrongswan against ws2_32.dll 2014-06-04 15:52:57 +02:00
Martin Willi 922ee2c529 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.
2014-06-03 12:24:34 +02:00