Commit Graph
39 Commits
Author SHA1 Message Date
Martin Willi 1b40b74de0 Pass opaque data to printf hooks and print_in_hook() 2012-07-13 13:23:29 +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 817ab8a8d4 Don't cast second argument of mem_printf_hook (%b) to size_t.
Also treat the given number as unsigned int.

Due to the printf hook registration the second argument of
mem_printf_hook (if called via printf etc.) is always of type int*.
Casting this to a size_t pointer and then dereferencing that as int does
not work on big endian machines if int is smaller than size_t (e.g. on ppc64).

In order to make this change work if the argument is of a type larger
than int, size_t for instance, the second argument for %b has to be casted
to (u_)int.
2012-03-27 09:10:34 +02:00
Tobias Brunner 5317dd6887 Added atomic compare and swap operations.
Using a GCC atomic builtin if available or a global mutex otherwise.
2011-12-23 11:04:55 +01:00
Tobias Brunner 68fcf91778 Unused variable removed. 2011-10-13 14:34:34 +02:00
Tobias Brunner 4a4cf41b9a Make sure /proc/$$/fd exists.
This avoids the error message generated by enumerator_create_directory().
2011-10-13 11:22:40 +02:00
Tobias Brunner 5051bd23eb Only close open file descriptors on Linux. 2011-10-13 11:21:57 +02:00
Tobias Brunner 9a8fdc159a Added a replacement for closefrom (available on *BSD). 2011-10-13 11:19:12 +02:00
Tobias Brunner 876961cf0e Properly print time differences.
time_t is not necessarily of type int.
2011-06-07 17:52:34 +02:00
Martin Willi ed678b52e2 Added a memwipe() function to safely overwrite sensitive memory 2011-05-09 14:36:14 +02:00
Martin Willi 21f411b861 Use a boolean expression for refcount check, fixes refcounting if bool is a signed char 2011-03-09 07:52:13 +01:00
Martin Willi 502edf425f Migrated psk/pubkey_authenticators to INIT/METHOD macros 2011-01-05 16:45:53 +01:00
Martin Willi a8809bb0cb Fixed status_t enum names definition 2010-10-04 10:48:00 +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 38031382dc Adding the OpenSSL plugin to the Android build. 2010-03-08 17:21:46 +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 fc1afcc89e The return value of snprintf is int not size_t. 2010-03-03 17:34:06 +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 b2944d71ca Use pthread_cond_timedwait_monotonic on Android. 2009-12-23 17:03:41 +01:00
Martin Willi 098466039f Fix word alignement in memxor() on 64-bit architectures 2009-11-12 13:37:06 +00:00
Martin Willi 323f9f990f replaces four spaces by tabs, where appropriate 2009-09-04 14:50:23 +02:00
Martin Willi 7daf5226b7 removed trailing spaces ([[:space:]]+$) 2009-09-04 13:46:09 +02:00
Martin Willi 3d5818ec38 use monotonic time source in convar->timed_wait, and in the scheduler using it 2009-08-31 15:13:48 +02:00
Martin Willi 3f310c0d1f implemented a monotonic timestamping function, unaffected from system time changes 2009-08-31 15:03:35 +02:00
Martin Willi 74b14b4008 cast pointers to uintptr_t for alignement check 2009-07-15 10:39:45 +02:00
Martin Willi 01e43e3183 memxor does not access unaligned words anymore, but still uses words if possible 2009-07-08 17:19:49 +02:00
Tobias Brunner 8c5d72cd0b removing svn keyword $Id$ from all files 2009-04-30 13:19:35 +00:00
Tobias Brunner d24a74c5b4 merging changes from portability branch back to trunk
important change for developers: %Y replaces %D to print identities!
2009-04-30 11:37:54 +00:00
Martin Willi da17b0169a added return_true/false() dummy functions 2009-04-24 14:08:42 +00:00
Tobias Brunner d25ce3701e printf hooks refactored to increase portability (i.e. support for platforms without glibc-compatible customizable printf - the Vstr string library is currently required on such platforms). 2009-03-12 18:07:32 +00:00
Tobias Brunner 81736d7d24 added memstr and extract_token_str helper functions 2008-12-03 09:45:58 +00:00
Martin Willi efd0fe21e4 ref_get()/ref_put() use atomic gcc operations if supported, thanks to Thomas Jarosch for the patch 2008-12-02 12:14:32 +00:00
Martin Willi f464d75070 added time.h include for struct tm 2008-12-02 08:46:15 +00:00
Martin Willi 4fd233a73e memxor() tweaks, as it is heavily used in xcbc 2008-11-26 10:06:59 +00:00
Tobias Brunner 6c20579a43 mkdir_p: utility function to create a directory and all required parent directories 2008-08-28 07:47:55 +00:00
Martin Willi 233b853dfa extended credential_set_t interface by a cache_cert() method
allows persistent or in-memory caching of fetched certificates
2008-04-17 11:22:37 +00:00
Martin Willi 081ae2eb61 fixed CRL check return value on revoked certificates
fixed possible refcounting bugs
generic return_null() implementation
2008-03-19 09:44:47 +00:00
Martin Willi 552cc11b1f merged the modularization branch (credentials) back to trunk 2008-03-13 14:14:44 +00:00