Tobias Brunner
f1e12da7ef
unit-tests: Don't use priority for destructor that unregisters testable functions
...
This fixes coverage reports, at least if leak detective is disabled.
If it is enabled the plugins are not unloaded so the destructor is not
executed until the process is destroyed, which seems not to be covered
by gcov.
2013-12-04 20:33:00 +01:00
Tobias Brunner
d5a0abfa92
unit-tests: Export ntru_drbg_create as testable function so no linking is required
...
This way the plugin does not have to be linked explicitly to the test
runner, which otherwise would require that the plugin is either always
enabled to build the tests or that ifdefs are added to the Makefile.
2013-12-04 20:32:59 +01:00
Tobias Brunner
4cea186b64
unit-tests: Add facility to register testable functions
...
These can be defined in plugins, or other parts of the tested libraries.
They can even be static.
2013-12-04 20:32:59 +01:00
Tobias Brunner
a24eec4649
unit-tests: Move ntru_test_rng_t to a utility class in libtest
2013-12-04 20:32:59 +01:00
Tobias Brunner
6354466a5b
unit-tests: Fix apidoc for libtest
2013-12-04 20:32:59 +01:00
Tobias Brunner
3e8a44c2aa
ntru: Fix compiler warning caused by ++/-- on righthand side of an assignment
...
The behavior of stuff like x = --x; (or x++) is not defined.
2013-12-04 20:32:59 +01:00
Tobias Brunner
7c7148b038
ike: Log SK_p consistently on level 4
2013-11-28 19:04:47 +01:00
Tobias Brunner
e9b49d412b
Merge branch 'nm-psk'
...
This adds support for PSK authentication to the NetworkManager frontend.
2013-11-27 18:37:11 +01:00
Tobias Brunner
0b506edb19
nm: Require the PSK to be at least 20 characters long
2013-11-27 18:36:58 +01:00
Tobias Brunner
692a421aa0
nm: German translation updated
2013-11-27 18:36:58 +01:00
Tobias Brunner
5ae822cfcd
nm: Handle PSK option in NM backend
2013-11-27 18:36:58 +01:00
Tobias Brunner
594878e552
nm: Add PSK option to auth-dialog
2013-11-27 18:36:58 +01:00
Tobias Brunner
63528ebd3f
nm: Add pre-shared key option in GUI
2013-11-27 18:36:58 +01:00
Tobias Brunner
cfaec93111
nm: Make intltool recognize glade files properly
2013-11-27 18:36:58 +01:00
Tobias Brunner
228db0433d
configure: Remove obsolete --enable-unit-tests option
2013-11-27 18:35:44 +01:00
Tobias Brunner
f5feeb04f3
charon-tkm: Don't run tests automatically during 'make check'
...
Due to the external dependencies these tests are quite inconvenient.
They can be run from the charon-tkm directory with 'make check-tkm'.
2013-11-27 18:35:44 +01:00
Tobias Brunner
d6032bff8b
charon-tkm: Migrate tests to our own test runner
...
Due to problems with the external libraries tkm_init/deinit can't be
called for each test case. Because of this leak detective has to be
disabled for these tests.
2013-11-27 18:35:44 +01:00
Tobias Brunner
70f4461359
charon-tkm: Support for out-of-tree build added
2013-11-27 18:35:44 +01:00
Tobias Brunner
20a48e4be3
chunk: Fix signedness warnings caused by chunk_from_* macros
...
There are countless other such warnings because e.g. chunk_create() is called
with char*, but at least we prevent users from causing such warnings
inadvertently when using these macros.
2013-11-27 18:28:44 +01:00
Tobias Brunner
c61ca66a39
trap-manager: Reset IKE_SA on bus_t if initiating fails
2013-11-21 13:43:31 +01:00
Tobias Brunner
bb492d80b5
trap-manager: Prevent deadlock when installing trap policies
...
Because the write lock was held while calling add_policies() on
child_sa_t, which finishes with a call to child_state_change() on bus_t,
a deadlock would ensue if CHILD_SAs are concurrently being established,
which also causes a call to child_state_change() that will require
the read lock in trap_manager_t.
No locks are now being held while creating the CHILD_SA and installing the
trap policies.
2013-11-21 11:12:59 +01:00
Tobias Brunner
906a4fd16b
coverage: Report branch coverage
2013-11-21 11:10:39 +01:00
Tobias Brunner
8071c2a5e3
testing: Config for Linux kernel 3.12
...
The most significant change is that CONFIG_ACPI_PROC_EVENT is now
finally removed (after being deprecated for a long time).
So to successfully shutdown the guests via ACPI the CONFIG_INPUT_EVDEV
option is now enabled.
2013-11-19 17:15:12 +01:00
Tobias Brunner
3bff80aee3
openssl: Verify that a peer's ECDH public value is a point on the elliptic curve
...
This check is mandated by RFC 6989. Since we don't reuse DH secrets,
it is mostly a sanity check.
2013-11-19 15:00:28 +01:00
Tobias Brunner
38a4f1964e
kernel-netlink: Enable TFC padding only for tunnel mode ESP SAs
...
The kernel does not allow them for transport mode SAs or IPComp SAs (and
of course not for AH SAs).
Fixes #446 .
2013-11-19 12:44:16 +01:00
Tobias Brunner
85adb98daf
android: New release based on 5.1.1
...
This fixes issues with IVs and padding in ESP handling and removes the
Vstr dependency.
2013-11-13 17:41:24 +01:00
Tobias Brunner
20c99edab9
android: Remove dependency on libvstr
2013-11-13 11:40:47 +01:00
Tobias Brunner
334f44cd29
unit-tests: Initialize tests with a callback
2013-11-06 10:31:07 +01:00
Tobias Brunner
8d2450d8b8
plugin-loader: Convenience function added to add plugin dirs in build tree
2013-11-06 10:31:07 +01:00
Tobias Brunner
c49c3f3208
ikev2: Properly free DH secret in case of errors during IKE key derivation
...
Fixes #437 .
2013-11-06 10:24:19 +01:00
Tobias Brunner
19046552b6
ipsec: Updated ipsec(8)
2013-10-29 17:22:45 +01:00
Tobias Brunner
71687f4fad
ipsec: Remove unused distro.txt
2013-10-29 16:34:10 +01:00
Tobias Brunner
5ac29360fc
utils: Include stdio.h for fmemopen() replacement
...
This might now be required because Vstr is not necessarily required
anymore, which means stdio.h might not be pulled in by prinf_hook.h.
2013-10-29 16:18:35 +01:00
Tobias Brunner
60ddf6284f
Use exact mask when calling umask(2)
...
Due to the previous negation the high bits of the mask were set, which
at least some versions of the Android build system prevent with a compile-time
check.
2013-10-29 16:01:55 +01:00
Tobias Brunner
348b9d82b4
libtnccs: Add dummy entry to pb_tnc_tcg_msg_infos
...
That's required because the first message type in pb_tnc_tcg_msg_type_t
is 1 not 0.
2013-10-29 13:36:15 +01:00
Tobias Brunner
751670a93b
swid: Properly clean up after reading SWID tag
2013-10-29 13:18:05 +01:00
Tobias Brunner
bb49dfb02e
man: strongswan.conf(5) updated
2013-10-29 11:45:25 +01:00
Tobias Brunner
1dd58b0e21
Fixed some typos
2013-10-29 11:44:23 +01:00
Tobias Brunner
71c9565a3a
pki: Replace BUILD_FROM_FD with passing a chunk via BUILD_BLOB
...
This allows more than one builder to try parsing the data read from STDIN.
2013-10-23 17:20:39 +02:00
Tobias Brunner
46cded2627
chunk: Add helper function to create a chunk from data read from a file descriptor
2013-10-23 17:20:39 +02:00
Tobias Brunner
8e8e97d10d
kernel-netlink: Check existence of linux/fib_rules.h, don't include it in distribution
...
This reverts commit b0761f1f0a .
2013-10-18 09:52:54 +02:00
Tobias Brunner
3ea7165a27
Merge branch 'icmp'
...
Improves handling of ICMP[v6] traffic selectors that specify message type and
code.
Fixes #421 .
2013-10-17 16:59:07 +02:00
Tobias Brunner
6956061197
ipsec.conf.5: Note about ICMP[v6] message type/code added
2013-10-17 16:57:39 +02:00
Tobias Brunner
4c185d11ad
updown: Properly configure ICMP[v6] message type and code in firewall rules
2013-10-17 16:57:39 +02:00
Tobias Brunner
9739a0bf67
updown: Pass ICMP[v6] message type and code to updown script
...
The type is passed in $PLUTO_MY_PORT and the code in $PLUTO_PEER_PORT.
2013-10-17 16:57:39 +02:00
Tobias Brunner
59213396fa
kernel-pfkey: Install ICMP[v6] type/code as expected by the Linux kernel
2013-10-17 16:57:39 +02:00
Tobias Brunner
406a504ca7
kernel-netlink: Convert ports in acquires to ICMP[v6] type and code
2013-10-17 16:57:39 +02:00
Tobias Brunner
ddc2d3c8e4
kernel-netlink: Properly install policies with ICMP[v6] types and codes
2013-10-17 16:57:39 +02:00
Tobias Brunner
000235f1c5
traffic-selector: Print ICMP[v6] message type and code in a more readable way
2013-10-17 16:57:39 +02:00
Tobias Brunner
4bebe45abb
traffic-selector: Store ICMP[v6] message type and code properly
...
We now store them as defined in RFC 4301, section 4.4.1.1.
2013-10-17 16:57:39 +02:00
Tobias Brunner
d6a1960d34
traffic-selector: Move class to its own Doxygen group
2013-10-17 16:57:38 +02:00
Tobias Brunner
5eb802ab18
Merge branch 'ecc-brainpool'
...
Adds support for ECC Brainpool curves for DH exchanges.
2013-10-17 16:56:31 +02:00
Tobias Brunner
7313499914
proposal: Add ECC Brainpool DH groups to the default proposal
2013-10-17 13:36:09 +02:00
Tobias Brunner
606aae3aa1
openssl: Add workaround if ECC Brainpool curves are not defined
2013-10-17 13:36:08 +02:00
Tobias Brunner
3c29d2822f
openssl: Add support for ECC Brainpool curves for DH, if defined by OpenSSL
...
OpenSSL does not include them in releases before 1.0.2.
2013-10-17 13:36:08 +02:00
Tobias Brunner
be97277bdb
unit-tests: Make test for bio_writer_t more portable
2013-10-17 11:44:03 +02:00
Tobias Brunner
f6cadb7f54
libipsec: Don't print ciphertext with ICV in log message
2013-10-17 11:43:58 +02:00
Tobias Brunner
f5c5fd6f74
libipsec: Properly calculate padding length especially for AES-GCM
2013-10-17 11:42:45 +02:00
Tobias Brunner
812ae898bf
utils: Add utility function to calculate padding length
2013-10-17 10:25:34 +02:00
Tobias Brunner
32fef0c6e9
stroke: Reuse reqids of established CHILD_SAs when routing connections
2013-10-17 10:23:32 +02:00
Tobias Brunner
6278e64230
trap-manager: Make sure a config is not trapped twice
2013-10-17 10:23:32 +02:00
Tobias Brunner
dd438ee22c
Doxygen fixes
2013-10-15 11:25:55 +02:00
Tobias Brunner
d14ba7e7fd
testing: Add libipsec/host2host-cert scenario
2013-10-11 18:04:48 +02:00
Tobias Brunner
d9020264f4
checksum: The pool utility was moved to its own directory
2013-10-11 17:42:29 +02:00
Tobias Brunner
0f6f7ba22c
ccm: Add missing comma in get_iv_gen method signature
2013-10-11 17:42:25 +02:00
Tobias Brunner
bfeb8b5c47
iv-gen: Add missing header files to Makefile.am
2013-10-11 17:42:05 +02:00
Tobias Brunner
1c1ba803ac
NEWS: Updates for the recent merges
2013-10-11 16:20:41 +02:00
Tobias Brunner
5ef630189a
Merge branch 'iv-gen'
...
Modularizes the generation of initialization vectors, which allows to use
different methods depending on the algorithms. For instance for AES-GCM
sequential IVs are now used instead of the earlier random IVs, which are
still used for other algorithms e.g. AES-CBC.
2013-10-11 15:55:49 +02:00
Tobias Brunner
0c6f6c4e34
iv_gen: Mask sequential IVs with a random salt
...
This makes it harder to attack a HA setup, even if the sequence numbers were
not fully in sync.
2013-10-11 15:55:40 +02:00
Tobias Brunner
e8229ad558
iv_gen: Provide external sequence number (IKE, ESP)
...
This prevents duplicate sequential IVs in case of a HA failover.
2013-10-11 15:55:40 +02:00
Tobias Brunner
d74c254dfd
ipsec: Use IV generator to encrypt ESP messages
2013-10-11 15:55:40 +02:00
Tobias Brunner
b5010707a0
ikev2: Use IV generator to encrypt encrypted payload
2013-10-11 15:55:40 +02:00
Tobias Brunner
50bd28d549
iv_gen: aead_t implementations provide an IV generator
2013-10-11 15:55:40 +02:00
Tobias Brunner
b3e1eb2afe
iv_gen: Add IV generator that allocates IVs sequentially
2013-10-11 15:55:40 +02:00
Tobias Brunner
53d1f2dbfd
iv_gen: Add IV generator that allocates IVs randomly
...
Uses RNG_WEAK as the code currently does elsewhere to allocate IVs.
2013-10-11 15:55:40 +02:00
Tobias Brunner
403057aa5a
crypto: Add generic interface for IV generators
2013-10-11 15:55:40 +02:00
Tobias Brunner
b38f7f703b
apidoc: Move mac_prf to prf Doxygen group
2013-10-11 15:55:40 +02:00
Tobias Brunner
af22622a9d
Merge branch 'radius-unity'
...
Adds support for Cisco Unity specific RADIUS attributes.
References #383 .
2013-10-11 15:52:36 +02:00
Tobias Brunner
feb3c4ff22
eap-radius: Forward RAT_FRAMED_IP_NETMASK as INTERNAL_IP4_NETMASK
2013-10-11 15:52:22 +02:00
Tobias Brunner
1a809e46f8
eap-radius: Forward UNITY_SPLIT_INCLUDE or UNITY_LOCAL_LAN attributes
...
Depending on the value of the CVPN3000-IPSec-Split-Tunneling-Policy(55)
radius attribute, the subnets in the CVPN3000-IPSec-Split-Tunnel-List(27)
attribute are sent in either a UNITY_SPLIT_INCLUDE (if the value is 1)
or a UNITY_LOCAL_LAN (if the value is 2).
So if the following attributes would be configured for a RADIUS user
CVPN3000-IPSec-Split-Tunnel-List := "10.0.1.0/255.255.255.0,10.0.2.0/255.255.255.0"
CVPN3000-IPSec-Split-Tunneling-Policy := 1
A UNITY_SPLIT_INCLUDE configuration payload containing these two subnets
would be sent to the client during the ModeCfg exchange.
2013-10-11 15:52:22 +02:00
Tobias Brunner
66229619cf
eap-radius: Forward UNITY_DEF_DOMAIN and UNITY_SPLITDNS_NAME attributes
...
The contents of the CVPN3000-IPSec-Default-Domain(28) and
CVPN3000-IPSec-Split-DNS-Names(29) radius attributes are forwarded in
the corresponding Unity configuration attributes.
2013-10-11 15:52:22 +02:00
Tobias Brunner
121c64f0d5
Merge branch 'dnscert'
...
The new dnscert plugin adds support for authentication via CERT resource
records that are protected with DNSSEC.
2013-10-11 15:49:24 +02:00
Tobias Brunner
ca28e13fe8
testing: Add ikev2/net2net-dnscert scenario
2013-10-11 15:45:42 +02:00
Tobias Brunner
a4d6a5a359
testing: Provide moon's and sun's certificate as CERT RR
2013-10-11 15:45:42 +02:00
Tobias Brunner
99a89ea7f4
testing: Enable dnscert plugin
2013-10-11 15:45:42 +02:00
Tobias Brunner
42525d1142
testing: Load testing.conf.local from the same directory as testing.conf
2013-10-11 15:45:42 +02:00
Tobias Brunner
8ac54970f5
ipseckey: Properly handle failure to create a certificate
...
Also, try the next key (if available) if parsing an IPSECKEY failed.
2013-10-11 15:45:41 +02:00
Tobias Brunner
e8130a9498
ipseckey: Refactor creation of certificate enumerator
...
Reduces nesting and fixes a memory leak (rrsig_enum).
2013-10-11 15:45:41 +02:00
Tobias Brunner
de5ea570f1
ipseckey: Depend on plugin features to create public key and certificate objects
2013-10-11 15:45:41 +02:00
Tobias Brunner
6ecf1aab35
unbound: Add support for DLV (DNSSEC Lookaside Validation)
...
Fixes #392 .
2013-10-11 15:45:25 +02:00
Tobias Brunner
1ff63f153e
Merge branch 'fwmarks'
...
Allows setting a mark on outbound packets and the routing rule
installed by charon. With those settings it is possible to setup
tunnels with kernel-libipsec where the remote peer is part of the remote
traffic selector.
The following example settings in strongswan.conf show how this can be
configured:
charon {
plugins {
kernel-netlink {
fwmark = !0x42
}
socket-default {
fwmark = 0x42
}
kernel-libipsec {
allow_peer_ts = yes
}
}
}
To make it work it is necessary to set
net.ipv4.conf.all.rp_filter
appropriately, otherwise the kernel drops the packets.
References #380 .
2013-10-11 15:33:06 +02:00
Tobias Brunner
cd25d291f7
kernel-libipsec: Don't ignore policies of type != POLICY_IPSEC
...
This actually broke rekeying due to the DROP policies that are
temporarily added, which broke the refcount as the ignored policies
were not ignored in del_policy() (the type is not known there).
2013-10-11 15:32:44 +02:00
Tobias Brunner
eeb34af069
kernel-libipsec: Add an option to allow remote TS to match the IKE peer
...
Setting the fwmark options for the kernel-netlink and socket-default
plugins allow this kind of setup.
It is probably required to set net.ipv4.conf.all.rp_filter to 2 to make
it work.
2013-10-11 15:32:44 +02:00
Tobias Brunner
80f8b3a6d8
socket-default: Allow setting firewall mark on outbound packets
2013-10-11 15:32:44 +02:00
Tobias Brunner
51fefe4606
kernel-netlink: Allow setting firewall marks on routing rule
2013-10-11 15:32:44 +02:00
Tobias Brunner
434e530f75
ipsec_types: Add utility function to parse mark_t from strings
2013-10-11 15:32:44 +02:00
Tobias Brunner
6d7710a744
Merge branch 'database-transactions'
...
This adds support for transactions to the database_t interface and the two
current implementations.
The pool utility is also moved to its own directory in src/.
2013-10-11 15:29:30 +02:00
Tobias Brunner
bd085dd978
attr-sql: Use a serializable transaction when inserting identities
2013-10-11 15:29:10 +02:00
Tobias Brunner
b283a6e9ef
database: Add support for serializable transactions
2013-10-11 15:29:10 +02:00
Tobias Brunner
e745f5f69f
sql: Don't use MyISAM engine and set collation/charset for all tables
...
The MyISAM engine doesn't support transactions.
2013-10-11 15:16:05 +02:00