Commit Graph
4233 Commits
Author SHA1 Message Date
Martin Willi ecc080b393 Add a return value to prf_t.allocate_bytes() 2012-07-16 14:53:34 +02:00
Martin Willi bc47488323 Add a return value to prf_t.get_bytes() 2012-07-16 14:53:33 +02:00
Martin Willi edd54734c8 prf_plus_create() can return NULL on failure 2012-07-16 14:53:33 +02:00
Martin Willi 8207fe3eb3 Add a return value to prf_plus_t.get_bytes() 2012-07-16 14:53:33 +02:00
Martin Willi 5d79e6c6b4 Add a return value to prf_plus_t.allocate_bytes() 2012-07-16 14:53:33 +02:00
Martin Willi 2d56575d52 Add a return value to signer_t.set_key() 2012-07-16 14:53:33 +02:00
Martin Willi 2e96de60a8 Add a return value to signer_t.get_signature() 2012-07-16 14:53:33 +02:00
Martin Willi cbfbba7d86 Add a return value to signer_t.allocate_signature() 2012-07-16 14:53:32 +02:00
Martin Willi ad08730a4b Add a return value to aead_t.set_key() 2012-07-16 14:53:32 +02:00
Martin Willi e2ed7bfd22 Add a return value to aead_t.encrypt() 2012-07-16 14:53:32 +02:00
Tobias Brunner d5962b874f Compilation error fixed if dladdr is not available 2012-07-14 11:43:40 +02:00
Martin Willi 40ae0feeb1 Silence cast warning on 32-bit platforms 2012-07-13 13:43:16 +02:00
Martin Willi 0e3c697c05 Don't set BFD_DECOMPRESS when building against older binutils 2012-07-13 13:42:31 +02:00
Martin Willi 060555f082 Append directly to base string in vstr printf hooks 2012-07-13 13:23:29 +02:00
Martin Willi 4addc415a5 Write directly to FILE stream in glibc printf hooks 2012-07-13 13:23:29 +02:00
Martin Willi 1b40b74de0 Pass opaque data to printf hooks and print_in_hook() 2012-07-13 13:23:29 +02:00
Martin Willi 549eba30ab Increase leak detective backtrace depth by a frame 2012-07-13 13:23:29 +02:00
Martin Willi 6499354e4a Don't access tail magic when reallocating invalid memory, as it would crash 2012-07-13 13:23:29 +02:00
Martin Willi 4c6c934635 With --enable-bfd-backtraces, use binutils libbfd to resolve backtraces
The invocation of addr2line to resolve backtrace source locations
is slow and cumbersome. When using libbfd directly, we can eliminate
the overhead of the process invocation. Even better, we can cache
library symbol names, bringing wicked fast lookups. As a neat bonus,
we can resolve static function names.
2012-07-13 13:23:29 +02:00
Martin Willi b46776aea1 Add an external method to disable leak detective temporarly 2012-07-13 13:23:29 +02:00
Tobias Brunner d15975c7f2 Added PLUGIN_NOOP to separate PLUGIN_PROVIDE from previous CALLBACK/REGISTER entries 2012-07-12 16:54:03 +02:00
Tobias Brunner c0b1fc7f8b Android.mk of libstrongswan adapted to config.h changes 2012-07-12 09:56:44 +02:00
Tobias Brunner 2b19dd3502 Properly cleanup thread-local values for the threads destroying thread_value_t objects 2012-07-12 09:43:27 +02:00
Andreas Steffen d4cf9cdf28 fixed libstrongswan/Makefile.am 2012-07-11 23:13:55 +02:00
Martin Willi b188f23199 Install dev headers only if --with-dev-headers= option is set 2012-07-11 11:16:31 +02:00
Martin Willi 4c311ffb1f Check if config.h passed correctly via gcc -include 2012-07-11 09:57:07 +02:00
Martin Willi 7115448529 Install libstrongswan development headers 2012-07-11 09:57:07 +02:00
Martin Willi 7300eb29d1 Use and install a config.h AC_CONFIG_HEADER that contains all AC_DEFINE results 2012-07-11 09:57:07 +02:00
Martin Willi 7c8b9fcbf6 Add safe_strerror() to leak detective whitelist
While the thread specific strerror buffer gets cleaned up for
worker threads during their termination, the main thread itself,
and so its strerror buffer, is still alive during leak reports.
2012-07-11 08:45:15 +02:00
Martin Willi dfd34c5a77 Add an option to disable libstrongswan certificate caching 2012-07-09 19:03:10 +02:00
Tobias Brunner ee7b7de18f getpwnam_r and getgrnam_r are not supported by the Android NDK 2012-07-09 17:52:01 +02:00
Tobias Brunner 7399119e58 Android.mk of libstrongswan updated 2012-07-09 17:52:01 +02:00
Martin Willi 0619ddfaa4 Refactored heavily #ifdefd capability code to its own libstrongswan class 2012-07-04 11:01:40 +02:00
Tobias Brunner 12fa85c664 Added wrapper for POSIX spin locks 2012-07-04 10:13:49 +02:00
Martin Willi 3e0fe9f13e Default to register_printf_specifier() if no printf hooking #defined
This allows us to build (non-./configured) external tools against
libstrongswan without explicitly specifiying the most commonly used
printf hooking function.
2012-07-03 13:09:14 +02:00
Tobias Brunner 901dbc1077 openssl: Ensure the thread ID is never zero
This might otherwise cause problems because OpenSSL tries to lock
mutexes recursively if it assumes the lock is held by a different
thread e.g. during FIPS initialization.
2012-07-03 12:02:57 +02:00
Martin Willi 997fdd1f02 Accept non-"/0" subnet sizes for traffic selectors starting at 0.0.0.0 2012-07-02 17:25:26 +02:00
Tobias Brunner a60e92a2c8 Added GPL header to AndroidConfigLocal.h 2012-06-29 16:51:29 +02:00
Tobias Brunner e516068965 Removed superfluous remove_hasher() call in md5 plugin 2012-06-29 16:23:20 +02:00
Tobias Brunner bbbffac3ab Defined a macro to replace strerror(3) with calls to thread-safe wrapper 2012-06-28 13:14:52 +02:00
Tobias Brunner 2a59527659 Thread-safe wrapper around strerror(3)/strerror_r(3) added 2012-06-28 13:14:52 +02:00
Tobias Brunner 8122ae8cd8 gcrypt: Register SHA1 first as HASH_PREFERRED depends on it 2012-06-27 11:31:16 +02:00
Tobias Brunner 92250a48a9 Added MAC wrappers to Android.mk 2012-06-26 07:58:04 +02:00
Tobias Brunner 43d01ab2f6 Build nonce plugin on Android 2012-06-26 07:56:15 +02:00
Tobias Brunner 197dbf5f72 Added support for the curl plugin on Android 2012-06-26 07:56:14 +02:00
Tobias Brunner e0efd7c121 Make rescheduling a job more predictable
This avoids race conditions between calls to cancel() and jobs that like
to be rescheduled.  If jobs were able to reschedule themselves it would
theoretically be possible that two worker threads have the same job
assigned (the one currently executing the job and the one executing the
same but rescheduled job if it already is time to execute it), this means
that cancel() could be called twice for that job.

Creating a new job based on the current one and reschedule that is also
OK, but rescheduling itself is more efficient for jobs that need to be
executed often.
2012-06-25 17:49:12 +02:00
Tobias Brunner 26d77eb3e6 Centralized thread cancellation in processor_t
This ensures that no threads are active when plugins and the rest of the
daemon are unloaded.

callback_job_t was simplified a lot in the process as its main
functionality is now contained in processor_t.  The parent-child
relationships were abandoned as these were only needed to simplify job
cancellation.
2012-06-25 17:38:59 +02:00
Tobias Brunner 7fec83af28 Give processor_t more control over the lifecycle of a job
Jobs are now destroyed by the processor, but they are allowed to
reschedule themselves.  That is, parts of the reschedule functionality
already provided by callback_job_t is moved to the processor.  Not yet
fully supported is JOB_REQUEUE_DIRECT and canceling jobs.

Note: job_t.destroy() is now called not only for queued jobs but also
after execution or cancellation of jobs.  job_t.status can be used to
decide what to do in said method.
2012-06-25 17:10:28 +02:00
Tobias Brunner 18d21a57df Added a method to plugin_loader_t to add 'static' plugin features
This allows daemons and other components to register plugin features
like those provided by plugins (following the same lifecycle).

The added features are internally handled like they were added by a
plugin.
2012-06-25 17:03:07 +02:00
Tobias Brunner e07122436c Make sure that all features of critical plugins are loaded 2012-06-25 17:03:07 +02:00