Tobias Brunner
a2a28d90ac
Make streq() and strcaseeq() static inline functions so they can be used as callbacks
2012-09-21 18:16:26 +02:00
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
753ca22f9c
Implement strdupnull() macro as static inline function.
...
This avoids compiler warnings if the argument is a const char*.
2012-06-11 17:33:30 +02:00
Martin Willi
d185b6acee
Make function pointer defined with METHOD() macro non-const
...
clang complains about it being const, and the object code
generated from gcc is the same.
2012-05-14 14:10:00 +02:00
Martin Willi
2e1f4a4631
Remove unused return value of INIT(), making clang happy
2012-05-14 14:07:00 +02:00
Martin Willi
b24be29646
Merge branch 'ikev1'
...
Conflicts:
configure.in
man/ipsec.conf.5.in
src/libcharon/encoding/generator.c
src/libcharon/encoding/payloads/notify_payload.c
src/libcharon/encoding/payloads/notify_payload.h
src/libcharon/encoding/payloads/payload.c
src/libcharon/network/receiver.c
src/libcharon/sa/authenticator.c
src/libcharon/sa/authenticator.h
src/libcharon/sa/ikev2/tasks/ike_init.c
src/libcharon/sa/task_manager.c
src/libstrongswan/credentials/auth_cfg.c
2012-05-02 11:12:31 +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
Martin Willi
b1f2f05c92
Merge branch 'ikev1-clean' into ikev1-master
...
Conflicts:
configure.in
man/ipsec.conf.5.in
src/libcharon/daemon.c
src/libcharon/plugins/eap_ttls/eap_ttls_peer.c
src/libcharon/plugins/eap_radius/eap_radius_accounting.c
src/libcharon/plugins/eap_radius/eap_radius_forward.c
src/libcharon/plugins/farp/farp_listener.c
src/libcharon/sa/ike_sa.c
src/libcharon/sa/keymat.c
src/libcharon/sa/task_manager.c
src/libcharon/sa/trap_manager.c
src/libstrongswan/plugins/x509/x509_cert.c
src/libstrongswan/utils.h
Applied lost changes of moved files keymat.c and task_manager.c.
Updated listener_t.message hook signature in new plugins.
2012-03-20 17:57:53 +01:00
Martin Willi
3ba15819ed
Remove executable flag from source code files
2012-03-20 17:31:22 +01:00
Martin Willi
1477ab157c
Remove unused status type
2012-03-20 17:31:18 +01:00
Clavister OpenSource
1390daae15
Added status code to status_t
...
New status_t enum to allow packets to be sent to peer in task_manager->process
2012-03-20 17:31:14 +01:00
Martin Willi
f4e25e602b
Implement htoun/untoh64 with potentially faster htobe64/be64toh macros, if available
2012-03-20 17:31:12 +01:00
Andreas Steffen
65840cc462
fixed copy-and-paste error
2012-03-20 17:31:12 +01:00
Andreas Steffen
cd419ae446
extended bio_reader and bio_writer to handle u_int64_t
2012-03-20 17:31:12 +01:00
Clavister OpenSource
0ea77083bb
Revert "IKEv1 XAuth: Added new MIGRATE status type to status_t."
...
This reverts commit b57df8310a867a0a65abf17279bf1b6e6bb2f5d3.
Conflicts:
src/libcharon/sa/task_manager_v1.c
2012-03-20 17:31:09 +01:00
Clavister OpenSource
b94f248ea9
IKEv1 XAuth: Added new MIGRATE status type to status_t.
...
When a task returns this status from a build or process method, it is a signal to the task manager that it should treat it as if the task returned SUCCESS.
Additionally it will migrate all remaining tasks from the current queue to a different one, calling swap_initiator for each applicable task.
Finally, the task manager will call "initiate", if applicable, to kick off tasks in the "queued_tasks" queue.
Task queue relocation mapping:
passive_tasks moves to queued_tasks (which is then fed to active by the initiate call).
active_tasks moves to passive_tasks
2012-03-20 17:30:52 +01: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
Andreas Steffen
a91462df09
fixed copy-and-paste error
2011-12-04 12:53:47 +01:00
Andreas Steffen
fbeb94544c
extended bio_reader and bio_writer to handle u_int64_t
2011-11-28 14:39:52 +01:00
Tobias Brunner
9a8fdc159a
Added a replacement for closefrom (available on *BSD).
2011-10-13 11:19:12 +02:00
Martin Willi
e3c881aff9
Return allocated variable in INIT()
2011-09-12 13:03:20 +02:00
Martin Willi
d45b242b60
Fix memwipe() of leading unaligned bytes
2011-05-24 11:49:20 +02:00
Martin Willi
ed678b52e2
Added a memwipe() function to safely overwrite sensitive memory
2011-05-09 14:36:14 +02:00
Martin Willi
1038d9fee5
Added a null-safe strdup variant
2011-01-05 16:46:02 +01:00
Martin Willi
7a3e0a6321
Added a strncaseeq variant to the string comparison macros
2011-01-05 16:45:59 +01:00
Martin Willi
502edf425f
Migrated psk/pubkey_authenticators to INIT/METHOD macros
2011-01-05 16:45:53 +01:00
Martin Willi
7ba89ccd7f
Added helper macros to define portable bitfields with gcc
2010-08-19 19:05:14 +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
Martin Willi
d02308502f
Add braces around empty body in if statement
2010-03-03 16:53:42 +01:00
Martin Willi
1abab9ec4f
Use "static const", some GCCs don't like "const static"
2010-03-03 10:44:49 +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
Martin Willi
23d2bf84a3
Added a METHOD2() macro that implements a method for two different interfaces
2010-01-21 14:42:08 +01:00
Martin Willi
dbee988e28
Cast unaligned memcpy() args to char*, avoids over-optimization on ARM
...
See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3934.html
2010-01-11 15:35:41 +01:00
Martin Willi
f8f4f31a77
Fixed untoh32 function
2009-12-23 13:08:56 +01:00
Martin Willi
1a1ff9d127
Added a METHOD() macro to define methods with both public and private signatures
2009-12-17 13:53:24 +01:00
Martin Willi
74eed73a40
Added a INIT() macro to initialize class instances
2009-12-17 13:53:24 +01:00
Martin Willi
0be12e3546
Added htoun16/32 and untoh16/32 to read/write unaligned network order integers
2009-12-15 13:39:01 +01:00
Andreas Steffen
9f0327e652
define TIME_32_BITS_SIGNED_MAX in utils.h
2009-11-08 18:55:52 +01: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
Tobias Brunner
e822fc576a
Added side effect free min and max macros.
2009-09-01 12:50:50 +02:00
Martin Willi
3f310c0d1f
implemented a monotonic timestamping function, unaffected from system time changes
2009-08-31 15:03:35 +02:00
Tobias Brunner
cc396286e8
Defined some missing fixed-width int types on OpenSolaris.
2009-08-14 14:50:22 +02:00
Andreas Steffen
5d8306de68
use SS_RC_FIRST and SS_RC_LAST
2009-08-06 16:42:44 +02:00
Andreas Steffen
3646c8a159
abort pluto or charon if initialization fails
2009-08-06 16:32:52 +02:00
Andreas Steffen
eab241fb56
stop strongswan if integrity check of libstrongswan or daemon fails
2009-07-17 20:33:19 +02:00
Tobias Brunner
a9f56adb59
more portable handling of the bool data type (Mac OS X has stdbool.h)
2009-05-06 09:11:13 -04:00