Commit Graph
100 Commits
Author SHA1 Message Date
Tobias Brunner 9d843ee6fa Do a proper cleanup when printing usage info. 2010-05-04 18:34:27 +02:00
Tobias Brunner 6d7f4e0653 Moved syslog.h include. 2010-05-04 18:34:20 +02:00
Tobias Brunner 6b57f5edff Compiler warning fixed. 2010-05-04 18:28:28 +02:00
Tobias Brunner 726c0ae9d3 We have to rename thread_create on Mac OS X because it conflicts with a syscall. 2010-04-29 14:52:20 +02:00
Tobias Brunner 1c31d34ed5 Initialize libstrongswan in stroke (fixes Vstr logging). 2010-04-29 14:51:44 +02:00
Tobias Brunner 26a3d7e78e Initialize libstrongswan in starter (fixes Vstr logging). 2010-04-29 14:33:29 +02:00
Tobias Brunner 361f416d2c The mutex of a thread has to be locked when destroying it. 2010-04-29 13:30:51 +02:00
Tobias Brunner 257e27df07 Fixing out-of-tree build after adding dependency to config.status. 2010-04-29 13:29:53 +02:00
Tobias Brunner 6edbe1652b Integrating libhydra into the Android build system. 2010-04-12 16:47:47 +02:00
Tobias Brunner b73b3a033f Use openssl in Android by default. 2010-04-12 15:54:48 +02:00
Tobias Brunner 355c3a66b1 When logging to the database, the IDs of an IKE SA are initially NULL. 2010-04-12 13:51:10 +02:00
Tobias Brunner 9f4b02e31d Fixed OpenSSL engine_id setting, i.e. do not use 'library.' prefix for settings in libstrongswan. 2010-04-10 12:10:04 +02:00
Tobias Brunner 0a4dc78755 Some whitespace fixes. 2010-04-06 12:56:06 +02:00
Tobias Brunner e41932320c Explicitly unload plugins before deinitializing libhydra and libstrongswan in pluto. 2010-04-06 12:47:41 +02:00
Tobias Brunner 894936ce9e Replaced some DBG_LIB with more specific groups. 2010-04-06 12:47:40 +02:00
Tobias Brunner 8b0e09103b Adding DBG_LIB to all calls of libstrongswan's version of DBG*. 2010-04-06 12:47:40 +02:00
Tobias Brunner 9ed6341d3f Adding support for debug groups in libstrongswan's logger. 2010-04-06 12:47:40 +02:00
Tobias Brunner 3fdee23f18 Move debug groups from charon's bus.h to libstrongswan's debug.h. 2010-04-06 12:47:40 +02:00
Tobias Brunner 9f3df622e4 Manually loading the pluto.(n)dns* settings is not needed anymore. 2010-04-06 12:47:40 +02:00
Tobias Brunner 7ac6060e8d Use daemon-specific config for the attr plugin. 2010-04-06 12:47:40 +02:00
Tobias Brunner a5ec302547 Moved attr plugin from libcharon to libhydra. 2010-04-06 12:47:40 +02:00
Tobias Brunner facf887253 Store the name of the daemon that initialized libhydra to load daemon-specific settings. 2010-04-06 12:47:40 +02:00
Tobias Brunner e82b5755be Added pluto/whack output to 'ipsec leases'. 2010-04-06 12:47:40 +02:00
Tobias Brunner 6bfa8e907c Added options to whack to query in-memory leases. 2010-04-06 12:47:39 +02:00
Tobias Brunner 4db0af9080 Added function to list the leases of the in-memory pools. 2010-04-06 12:47:39 +02:00
Tobias Brunner 4e06abe0fa Delete the in-memory IP address pools if a connection gets deleted.
This fixes ipsec reload.
2010-04-06 12:47:39 +02:00
Tobias Brunner bd22823358 Use whack_attribute in pluto to provide in-memory IP address pools.
The pools are configured by setting rightsourceip in ipsec.conf to a
network in CIDR notation.
2010-04-06 12:47:39 +02:00
Tobias Brunner 89715bd790 Adding a whack_attribute class which manages in-memory pools in pluto and is very similar to stroke_attribute. 2010-04-06 12:47:39 +02:00
Tobias Brunner c9235353f8 Use a read-write lock in stroke_attribute to increase concurrency. 2010-04-06 12:47:39 +02:00
Tobias Brunner fb111e5507 Make in-memory pool thread-safe. 2010-04-06 12:47:39 +02:00
Tobias Brunner 8c9f5bad8b Migrated stroke_attribute_t to METHOD/INIT macros. 2010-04-06 12:47:38 +02:00
Tobias Brunner ac5fb545c5 Extracted in-memory IP address pool from stroke plugin to libhydra. 2010-04-06 12:47:38 +02:00
Tobias Brunner 18c68f22c7 Revert "Use the same formatting as in the Makefiles of the other plugins. Makes refactorings easier."
This reverts commit e91b116a62. Missed to
notice commit 89bf11d204.
2010-03-26 10:47:09 +01:00
Tobias Brunner e91b116a62 Use the same formatting as in the Makefiles of the other plugins. Makes refactorings easier. 2010-03-26 10:40:14 +01:00
Tobias Brunner 70d70c8a2e Link libhydra to checksum_builder so the hydra object is defined. 2010-03-24 18:54:26 +01:00
Tobias Brunner 58f86d0f0f Changed all usages of lib->attributes to hydra->attributes. 2010-03-24 18:54:26 +01:00
Tobias Brunner 567d3f1463 Attributes moved from libstrongswan to libhydra.
The attribute_manager_t instance is now located on the new hydra object
instead of the lib object.
2010-03-24 18:53:10 +01:00
Tobias Brunner 83218f0d65 Fixing Doxygen for libhydra. 2010-03-24 18:53:10 +01:00
Tobias Brunner 1f4e0f61dd Segment check added for libhydra. 2010-03-24 18:53:10 +01:00
Tobias Brunner a1f90c7a85 Fixed deinit for charon --version. 2010-03-24 18:53:10 +01:00
Tobias Brunner 52bff307e1 Init/deinit libhydra in charon and pluto. 2010-03-24 18:53:10 +01:00
Tobias Brunner f9b1db1631 Adding libhydra_init, which is currently only needed for integrity checks. 2010-03-24 18:53:10 +01:00
Tobias Brunner 39856897e6 Link pluto and charon to libhydra, fixes monolithic build. 2010-03-24 18:53:10 +01:00
Tobias Brunner bde5163ae0 Moving attr-sql config in strongswan.conf to libhydra. 2010-03-24 18:53:09 +01:00
Tobias Brunner 2cba58c5b7 Fixing integrity-checks after moving the attr-sql plugin and adding libhydra. 2010-03-24 18:53:09 +01:00
Tobias Brunner 75dc019252 Moving attr-sql plugin from libstrongswan to libhydra. 2010-03-24 18:53:09 +01:00
Tobias Brunner 0bf68cbf7c Adding libhydra stub. 2010-03-24 18:53:09 +01:00
Tobias Brunner dc9ddba6e3 Adapted test_pool to the libstrongswan threading. 2010-03-24 18:51:52 +01:00
Tobias Brunner 48aa81a67a Link libcharon to checksum_builder in order to get rid of the fake symbols. 2010-03-24 17:54:07 +01:00
Tobias Brunner d7e977aced Fixed some Doxygen warnings. 2010-03-24 15:45:06 +01:00
Tobias Brunner 037fb02493 Fixed compiler warning. 2010-03-24 12:03:08 +01:00
Tobias Brunner cf46ff6875 Use vstr/gmp as shared libraries in the Android build. 2010-03-23 11:39:58 +01:00
Tobias Brunner c92c94542a Missed to include charon's Android.mk in the distribution. 2010-03-22 11:32:20 +01:00
Tobias Brunner d92b337fe9 Do not indent the source file lists in Android.mk files so we can easily compare them to the lists in the Makefile.am files. 2010-03-19 13:34:53 +01:00
Tobias Brunner 0f5a043989 Use wildcards to gather plugin source files. 2010-03-19 13:34:53 +01:00
Tobias Brunner 52c7257366 Adding support for the build of libcharon (and charon) on Android. 2010-03-19 13:34:53 +01:00
Tobias Brunner 78060ba063 Do not link libcharon to libstrongswan.
Linking to libstrongswan breaks the integrity-tests because libtool
relinks libcharon to libstrongswan on install, thus changing the
checksum.
2010-03-19 13:34:53 +01:00
Tobias Brunner ef87a61efd Explicitly link charon to libstrongswan.
Also fixed the reference to the pthread library.
2010-03-19 13:34:53 +01:00
Tobias Brunner 02222dfa65 Make integrity tests compatible with libcharon.
This does currently not work because libtool relinks libcharon on
install, thus changing the checksum.
2010-03-19 13:34:53 +01:00
Tobias Brunner 349fa52852 Replacing the original charon with a small wrapper around libcharon. 2010-03-19 13:34:52 +01:00
Tobias Brunner bd3f8ea30b Convert charon into libcharon. 2010-03-19 13:34:52 +01:00
Tobias Brunner 08c5572602 Moving charon to libcharon. 2010-03-19 13:34:52 +01:00
Tobias Brunner 7b1fc2f7cf Fixing a compiler warning when building with -Wextra. 2010-03-16 12:42:58 +01:00
Tobias Brunner d5f1b9b3c1 Reordered the name and sname construction. 2010-03-12 17:34:32 +01:00
Tobias Brunner 01b87c2bc1 Fixed a bug in pluto's x509 handling.
This bug would have lead to a segmentation fault, if no public key could
have been extracted from a certificate.
2010-03-12 17:28:20 +01:00
Tobias Brunner a5166b16a1 Adding socket-default to the plugin list in all test cases. 2010-03-09 17:43:21 +01:00
Tobias Brunner 908d571796 Provide the Diffie Hellman parameters from a central location, so that we do not have to replicate them in every plugin that implements the DH interface.
The main reason for this change is that Android's libcrypto does not
include the get_rfcX_prime_Y functions by default.  Therefore we would
have had to replicate the primes a third time.
2010-03-09 17:15:16 +01:00
Tobias Brunner 38031382dc Adding the OpenSSL plugin to the Android build. 2010-03-08 17:21:46 +01:00
Tobias Brunner 16c8442a3e Fixing integrity tests after renaming the plugin constructors. 2010-03-08 15:34:38 +01:00
Tobias Brunner d543d9cadf Adding a helper function that translates single characters in a string. 2010-03-08 15:34:38 +01:00
Tobias Brunner d14203b009 Replaced the deprecated RSA_generate_key with RSA_generate_key_ex. 2010-03-08 15:34:38 +01:00
Tobias Brunner 3bcfb271a3 Make Android.mk depend on configure.in, so it gets rebuilt if the version number got changed. 2010-03-05 14:59:29 +01:00
Tobias Brunner d6731a0f26 parser.l includes y.tab.h, so it must be built first 2010-03-05 14:59:22 +01:00
Tobias Brunner 73f5940b1c Ignore the generated y.output. 2010-03-05 14:47:08 +01:00
Tobias Brunner 551b02029e Do not hardcode the path to the strongSwan sources. 2010-03-05 14:47:08 +01:00
Tobias Brunner de64e2166d Ignore the generated Android.mk 2010-03-05 14:47:08 +01:00
Tobias Brunner 807c12ce66 Generate the main Android.mk, so the version number is not hardcoded.
We include the generated file in the distribution, so users won't
have run configure if they are building for Android.
2010-03-05 14:46:59 +01:00
Tobias Brunner 0ace35282c Build libstrongswan before building any plugins during the non-monolithic build (as it was before). 2010-03-05 11:05:32 +01:00
Tobias Brunner f9622e8cbb Disabling warnings about arithmethic with void* on Android. 2010-03-03 17:37:20 +01:00
Tobias Brunner ea2f2c4b90 Fixing a bug on platforms where size_t is unsigned. 2010-03-03 17:35:19 +01:00
Tobias Brunner 465ccdc8cf The parsed timeval is unsigned. 2010-03-03 17:34:49 +01:00
Tobias Brunner fc1afcc89e The return value of snprintf is int not size_t. 2010-03-03 17:34:06 +01:00
Tobias Brunner 1be3298807 Adding Android.mk files to build charon and libstrongswan with the Android build system. 2010-03-03 10:18:46 +01:00
Tobias Brunner afb364fff9 Reverting eba28948a5 which was only necessary when cross-compiling the plugins for Android 2.0.
With the coming monolithic build using Android.mk files this won't be
necessary anymore.
2010-03-02 12:03:44 +01:00
Tobias Brunner 4e657051f7 Streamlined the source file list formatting in plugin makefiles. 2010-03-02 10:40:50 +01:00
Tobias Brunner fac3bfa5cd Fixing some includes by replacing <> with "".
I changed only the includes needed to fix the build on Android, which has an utils.h system header file, but we should probably change all the local includes in libstrongswan to "" and relative paths.
2010-03-02 10:38:58 +01:00
Tobias Brunner 6ec60bb92b Link all enabled libstrongswan plugins into the library, link all enabled charon plugins into libcharon. 2010-03-02 10:38:52 +01:00
Tobias Brunner 3724668b3d Enabling the plugin loader to be able to load plugins without explicitly loading a shared object file first. 2010-03-02 09:10:32 +01:00
Tobias Brunner 3372ad144b Adding an option to build libstrongswan and charon monolithically. 2010-03-02 09:10:32 +01:00
Tobias Brunner 9ce567f895 Changed plugin constructors from plugin_create to plugin_name_plugin_create. 2010-03-02 09:10:26 +01:00
Tobias Brunner 6cc13cd9c5 Removing the plugin constructor declarations from the header files. 2010-03-02 09:10:19 +01:00
Tobias Brunner c711687c00 Force libdl if the android plugin is enabled. AC_SEARCH_LIBS thinks it's not required, but on Android 2.0 it is. 2010-02-25 13:51:05 +01:00
Tobias Brunner eba28948a5 Link all plugins to libstrongswan. 2010-02-25 13:51:05 +01:00
Tobias Brunner 608af0a445 Avoid a race condition that could lead to a segmentation fault.
Let's assume the callback function of a callback job returns
JOB_REQUEUE_FAIR in one call and JOB_REQUEUE_NONE in the next. Before
this fix, the thread executing the callback job would requeue the job
before unregistering itself. If there was a context switch right after
the job got requeued, and if the thread that requeued the job never got
resumed until a second thread executed the job and, due to the return
value of JOB_REQUEUE_NONE, destroyed it, then when the first thread
eventually got resumed and tried to lock the mutex to unregister itself
the pointer wouldn't be valid anymore, thus resulting in a segmentation fault.
2010-02-25 09:26:16 +01:00
Tobias Brunner 38da64fe12 Detect windows hosts to add specific workarounds. 2010-02-12 10:57:39 +01:00
Tobias Brunner 71baf5a8f0 Adding support for AES GMAC (RFC4543). 2010-02-12 10:57:39 +01:00
Tobias Brunner 3cc0cc4332 Increased the buffer for netlink responses.
If an error occurs while manipulating policies in the kernel, the
original netlink request gets attached to the response.

Prior to Linux 2.6.32 the size in the netlink header of the response was
wrong.
2010-02-05 20:10:54 +01:00
Tobias Brunner 41faec0791 Some whitespace and code cleanups concerning the mediation extension. 2010-02-02 15:53:22 +01:00
Tobias Brunner dc5969242f Join pluto's fetching thread instead of detaching it in order to avoid that the leak-detective reports a memleak. 2010-02-02 15:23:39 +01:00
Tobias Brunner 776f59f7be Block the signals before the call to sigwait. 2010-01-12 11:52:03 +01:00