Tobias Brunner
e9a7779003
Avoid memset in is_anyaddr()
2012-09-21 18:16:26 +02:00
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
5f9d62fb91
Add a linked list constructor taking items from a vararg list
2012-09-18 17:11:02 +02:00
Tobias Brunner
4e16d2e864
Fix Doxygen comment for proposal_keywords_t
...
Two dots seem to mark the end of a list.
2012-09-18 16:13:23 +02:00
Tobias Brunner
35e2afd459
Fix equality comparison of auth_cfg_t
...
We previously only confirmed that rules contained in the first config are also
contained in the second, but since the number of rules does not have to
be equal, it might be that the second config contains rules that the
first one doesn't.
2012-09-18 14:40:41 +02:00
Tobias Brunner
3a8852c76f
Add AUTH_RULE_IDENTITY_LOOSE which allows to use IDr loosely as initiator
...
If it is set on an auth config IDr will not be sent, and later the configured
identity will not only be checked against the returned IDr, but also
against other identities contained in the responder's certificate.
2012-09-18 11:16:10 +02:00
Tobias Brunner
08ad639f32
Added algorithm lookup via kernel_interface_t to the various kernel interfaces
2012-09-13 15:48:49 +02:00
Tobias Brunner
4c57c63062
Added possibility to register custom proposal keywords
...
Keyword lookup and registration are handled via the new lib->proposal object.
2012-09-13 15:44:46 +02:00
Tobias Brunner
995875210a
Removed len argument from proposal_get_token()
...
Also use enumerators instead of lexparser.h to parse proposal strings.
2012-09-13 15:44:01 +02:00
Tobias Brunner
1962e12fd3
Make arguments for enumerator_create_token|directory const
2012-09-13 15:42:38 +02:00
Francois ten Krooden
8c2ec47149
Moved proposal_keywords to proposal_keywords_static
...
Added new proposal keywords with function to reference the static keywords.
2012-09-13 15:42:38 +02:00
Tobias Brunner
4a4d20de9d
Allow calls to set_address() for any host-sized TS, not only dynamic ones
...
This fixes CHILD_SA updates (e.g. due to MOBIKE), which were broken
since 4cb0783 .
2012-09-12 18:14:01 +02:00
Martin Willi
4cb0783f3c
Don't return a subset for a dynamic TS unless set_address has been called
2012-09-11 16:18:28 +02:00
Martin Willi
dc7b79d8a5
Add a linked list constructor initializing from an enumerator
2012-09-11 16:18:28 +02:00
Martin Willi
7b68cd9212
Add strongswan.conf runtime options for /dev/[u]random files
...
Fixes #221 .
2012-09-10 17:07:51 +02:00
Tobias Brunner
d1604d0551
Merge branch 'android-client-cert'
...
Introduces IKEv2 client certificate authentication for the Android App.
2012-09-04 13:58:49 +02:00
Tobias Brunner
69f731a9d8
android: Enable pkcs8 plugin
2012-08-31 18:24:46 +02:00
Tobias Brunner
868409139b
Merge branch 'eap-client-select'
...
This brings support for EAP-Nak payloads on the client (to select a
specific or supported method), and the server (via the eap-dynamic
plugin which selects a method supported/requested by the client).
2012-08-31 12:25:41 +02:00
Tobias Brunner
700ff5def9
Added eap-dynamic plugin which can proxy any other EAP method
2012-08-31 11:42:01 +02:00
Tobias Brunner
db409006e4
Function added that parses EAP method strings ([eap-]type[-vendor])
2012-08-31 11:40:28 +02:00
Tobias Brunner
eae5616ae6
Move our pseudo EAP types out of the range of valid EAP methods
2012-08-31 11:31:48 +02:00
Tobias Brunner
db275b1477
Ported tun_device de-/initialization to FreeBSD
2012-08-29 15:34:17 +02:00
Martin Willi
584c063e36
Ported tun_device initialization to OS X utun
2012-08-28 11:16:31 +02:00
Andreas Steffen
dbb7859f9f
define pen_type_t as a vendor-specific type
2012-08-20 22:37:08 +02:00
Martin Willi
88a5abf5e2
Don't use POSIX semaphores if a MONOTONIC clock is available
...
POSIX semaphores use CLOCK_REALTIME, but our semaphore_t abstraction
expects CLOCK_MONOTONIC based times. Use the mutex/condvar based
fallback if time_monotonic() actuall returns monotonic times.
2012-08-20 18:01:20 +02:00
Martin Willi
907d3d0f1d
Add a mutex/condvar based semaphore implementation if sem_timedwait is unavailable
...
Fixes #214 .
2012-08-20 17:20:26 +02:00
Andreas Steffen
f39b3915cd
added IBM and OpenPTS Private Enterprise Numbers
2012-08-20 15:02:25 +02:00
Tobias Brunner
3570c43968
openssl: Fix registration of the PUBKEY builder
...
libtls drops support for RSA suites if it does not find an RSA backend
(final builder for RSA public keys).
2012-08-18 17:49:57 +02:00
Tobias Brunner
7ab348370c
Add a wrapper around vstr_add_fmt() to avoid having to link libcharon against libvstr
...
At least on Android the latter would be required.
2012-08-17 11:47:52 +02:00
Andreas Steffen
17f806d8d0
fixed Makefile for libstrongswan dev headers
2012-08-14 10:21:28 +02:00
Tobias Brunner
305d98b780
Validate netmask in traffic_selector_create_from_subnet
...
Fixes #216 .
2012-08-13 13:46:19 +02:00
Tobias Brunner
36a3981d47
Comment fixed
2012-08-13 13:17:53 +02:00
Tobias Brunner
09ae3d79ca
Merge branch 'android-app'
...
This branch introduces a userland IPsec implementation (libipsec) and an
Android App which targets the VpnService API that is provided by Android 4+.
The implementation is based on the bachelor thesis 'Userland IPsec for
Android 4' by Giuliano Grassi and Ralf Sager.
2012-08-13 12:07:52 +02:00
Tobias Brunner
efbb5e8c57
Ensure thread IDs always start with 1 even if the library is reused
...
Within the Android App the library stays loaded in memory and is just
initialized/deinitialized with each connection, the static thread
counter would continuously increase without this patch.
2012-08-13 11:28:08 +02:00
Tobias Brunner
f12b3ad2c9
Don't print hosts as %any if %+H is used
...
That is, the plus sign can be used in the format string to force a numeric
string representation of all host_t objects even 0.0.0.0 and :: which
would otherwise be printed as %any and %any6.
2012-08-13 11:00:29 +02:00
Tobias Brunner
495e12aead
Add support for '+' in custom format specifiers
2012-08-13 11:00:28 +02:00
Tobias Brunner
e4ef4c9877
Merge branch 'android-ndk'
...
This branch comes with some preliminary changes for the user-land IPsec
implementation and the Android App.
One important change is that the UDP ports used by the socket-default plugin
were made configurable (either via ./configure or strongswan.conf).
Also, the plugin does randomly allocate a port if it is configured to 0,
which is useful for client implementations. A consequence of these
changes is that the local UDP port used when creating ike_cfg_t objects has
to be fetched from the socket.
2012-08-13 10:45:39 +02:00
Tobias Brunner
3b891b9e5b
Avoid problems with Doxygen by adding warn_unused_result attribute at the end of method signatures
2012-08-11 16:48:09 +02:00
Tobias Brunner
2c93a214aa
Add warn_unused_result attributes to rng_(get|allocate)_bytes_not_zero
...
Also fixed Doxygen comments.
2012-08-11 16:30:27 +02:00
Martin Willi
a63192479d
If _POSIX_SPIN_LOCKS is defined as -1, it is not available
2012-08-10 17:02:46 +02:00
Martin Willi
922fb29f89
If vstr printf functions are #defined, undef them before redefinition
...
At least Mountain Lion seems to have them #defined to secure _chk
variants.
2012-08-10 17:02:05 +02:00
Martin Willi
0bac49b0a9
Add getspnam_r() to leak detective whitelist
2012-08-10 10:43:44 +02:00
Tobias Brunner
34400edc37
Added utility class to create TUN devices
...
Currently works only on Linux.
2012-08-08 15:41:03 +02:00
Tobias Brunner
156f7e9b85
Moved types used by kernel_ipsec_t interface (and libipsec) to libstrongswan
...
This avoids a dependency of libipsec to libhydra.
2012-08-08 15:41:02 +02:00
Tobias Brunner
2dde79aca6
Added a simple blocking queue around linked_list_t
2012-08-08 15:41:02 +02:00
Tobias Brunner
ec486e9433
Extended constructor for packet_t added (takes src, dst and data)
2012-08-08 15:41:02 +02:00
Tobias Brunner
5764a9b355
Moved packet_t to libstrongswan
2012-08-08 15:41:02 +02:00
Tobias Brunner
6dfdcf420f
Added a method to bio_writer_t that allows to skip a number of bytes
...
A chunk pointing to the skipped bytes is returned, allowing users of
bio_writer_t to write/copy data to the skipped bytes themselves.
2012-08-08 15:41:02 +02:00
Tobias Brunner
59a15a7475
Added a method to bio_writer_t that allows to extract the internal buffer
2012-08-08 15:41:02 +02:00
Tobias Brunner
c1830d2670
Added methods to bio_reader_t to read data from end of buffer
2012-08-08 15:41:02 +02:00