strongswan.git
4 years agounit-tester: Drop the old unit-tester libcharon plugin
Martin Willi [Tue, 4 Nov 2014 14:00:15 +0000 (15:00 +0100)]
unit-tester: Drop the old unit-tester libcharon plugin

While it has some tests that we don't directly cover with the new unit tests,
most of them require special infrastructure and therefore have not been used
for a long time.

4 years agoattributes: Move the configuration attributes framework to libcharon
Martin Willi [Tue, 4 Nov 2014 13:45:34 +0000 (14:45 +0100)]
attributes: Move the configuration attributes framework to libcharon

4 years agolibcharon: Add a test runner
Martin Willi [Fri, 12 Dec 2014 11:44:32 +0000 (12:44 +0100)]
libcharon: Add a test runner

4 years agoattr-sql: Move plugin to libcharon
Martin Willi [Tue, 4 Nov 2014 13:22:20 +0000 (14:22 +0100)]
attr-sql: Move plugin to libcharon

4 years agoattr: Move plugin to libcharon
Martin Willi [Tue, 4 Nov 2014 13:19:03 +0000 (14:19 +0100)]
attr: Move plugin to libcharon

4 years agoresolve: Move plugin back to libcharon
Martin Willi [Tue, 4 Nov 2014 13:13:34 +0000 (14:13 +0100)]
resolve: Move plugin back to libcharon

Since pluto is gone, all existing users build upon libcharon.

4 years agoMerge branch 'tkm-reqid-alloc'
Martin Willi [Wed, 4 Feb 2015 10:31:47 +0000 (11:31 +0100)]
Merge branch 'tkm-reqid-alloc'

Fixes expires raised by charon-tkm to actually use a proto/dst/SPI tuple to
identify CHILD_SAs.

4 years agotesting: Add tkm xfrmproxy-expire test
Reto Buerki [Thu, 18 Dec 2014 10:49:05 +0000 (11:49 +0100)]
testing: Add tkm xfrmproxy-expire test

This test asserts that the handling of XFRM expire messages from the
kernel are handled correctly by the xfrm-proxy and the Esa Event Service
(EES) in charon-tkm.

4 years agotesting: Assert ees acquire messages in xfrmproxy tests
Reto Buerki [Thu, 18 Dec 2014 09:43:42 +0000 (10:43 +0100)]
testing: Assert ees acquire messages in xfrmproxy tests

4 years agocharon-tkm: Use get_dst_host getter in EES callback
Reto Buerki [Fri, 19 Dec 2014 08:11:12 +0000 (09:11 +0100)]
charon-tkm: Use get_dst_host getter in EES callback

Use the new get_dst_host getter to retrieve the destination host from
the SAD using the reqid, spi and protocol values received from the
xfrm-proxy.

4 years agocharon-tkm: Add get_dst_host getter to SAD
Reto Buerki [Fri, 19 Dec 2014 07:54:22 +0000 (08:54 +0100)]
charon-tkm: Add get_dst_host getter to SAD

This function returns the destination host of an SAD entry for given
reqid, spi and protocol arguments or NULL if not found.

4 years agocharon-tkm: Improve SAD get_esa_id log messages
Reto Buerki [Fri, 19 Dec 2014 07:52:19 +0000 (08:52 +0100)]
charon-tkm: Improve SAD get_esa_id log messages

4 years agocharon-tkm: Store reqid in SAD
Reto Buerki [Thu, 18 Dec 2014 16:58:26 +0000 (17:58 +0100)]
charon-tkm: Store reqid in SAD

4 years agocharon-tkm: Store remote SPI in SAD
Reto Buerki [Thu, 18 Dec 2014 15:49:16 +0000 (16:49 +0100)]
charon-tkm: Store remote SPI in SAD

Store the remote instead of the local SPI in the SAD when adding a new
entry in the kernel plugin's add_sa() function.

Since only one ESA context must be destroyed for an inbound/outbound
CHILD SA pair, it does not matter which SPI is used to retrieve it in
the del_sa function.

4 years agocharon-tkm: Make CHILD/ESP SA database public
Reto Buerki [Thu, 18 Dec 2014 15:24:07 +0000 (16:24 +0100)]
charon-tkm: Make CHILD/ESP SA database public

Make the CHILD/ESP SA database a public member of the global tkm_t
struct.

4 years agoMerge branch 'reqid-alloc'
Martin Willi [Thu, 19 Feb 2015 17:18:51 +0000 (18:18 +0100)]
Merge branch 'reqid-alloc'

With these changes, charon dynamically allocates reqids for CHILD_SAs. This
allows the reuse of reqids for identical policies, and basically allows multiple
CHILD_SAs with the same selectors. As reqids do not uniquely define a CHILD_SA,
a new unique identifier for CHILD_SAs is introduced, and the kernel backends
use a proto/dst/SPI tuple to identify CHILD_SAs.

charon-tkm is not yet updated and expires are actually broken with this merge.
As some significant refactorings are required, this is fixed using a separate
merge.

References #422, #431, #463.

4 years agocharon-tkm: Fix logger entity name in tests.c
Reto Buerki [Thu, 18 Dec 2014 15:16:49 +0000 (16:16 +0100)]
charon-tkm: Fix logger entity name in tests.c

Change 'test_runner' to 'test-runner'.

4 years agoike: Consistently log CHILD_SAs with their unique_id instead of their reqid
Martin Willi [Tue, 28 Oct 2014 09:54:38 +0000 (10:54 +0100)]
ike: Consistently log CHILD_SAs with their unique_id instead of their reqid

4 years agotesting: Assert proper ESA deletion
Reto Buerki [Thu, 18 Dec 2014 16:32:09 +0000 (17:32 +0100)]
testing: Assert proper ESA deletion

Extend the tkm/host2host-initiator testcase by asserting proper ESA
deletion after connection shutdown.

4 years agounity: Reference IKE_SAs by the IKEv1 COOKIEs, improving lookup performance
Martin Willi [Mon, 27 Oct 2014 15:16:13 +0000 (16:16 +0100)]
unity: Reference IKE_SAs by the IKEv1 COOKIEs, improving lookup performance

When handling thousands of IKE_SAs, the unique ID based lookup is rather slow,
as we have no indexing.

4 years agoike-sa-manager: Remove IKE_SA checkout by CHILD_SA reqid
Martin Willi [Mon, 27 Oct 2014 15:08:59 +0000 (16:08 +0100)]
ike-sa-manager: Remove IKE_SA checkout by CHILD_SA reqid

4 years agomigrate-job: Do CHILD_SA reqid lookup locally
Martin Willi [Mon, 27 Oct 2014 15:03:05 +0000 (16:03 +0100)]
migrate-job: Do CHILD_SA reqid lookup locally

4 years agokernel-interface: Raise mapping event with a proto/SPI/dst tuple
Martin Willi [Mon, 27 Oct 2014 14:38:47 +0000 (15:38 +0100)]
kernel-interface: Raise mapping event with a proto/SPI/dst tuple

4 years agoinactivity-job: Schedule job by CHILD_SA unique ID instead of reqid
Martin Willi [Mon, 27 Oct 2014 14:19:09 +0000 (15:19 +0100)]
inactivity-job: Schedule job by CHILD_SA unique ID instead of reqid

4 years agocharon-tkm: Fix compilation of ees_callback.c
Reto Buerki [Mon, 17 Nov 2014 14:15:19 +0000 (15:15 +0100)]
charon-tkm: Fix compilation of ees_callback.c

Update the call to hydra->kernel_interface->expire to make
ees_callback.c compile again. The required destination host argument is
set to NULL for now.

4 years agokernel-interface: Raise expires with a proto/SPI/dst tuple instead of reqid
Martin Willi [Mon, 27 Oct 2014 14:07:05 +0000 (15:07 +0100)]
kernel-interface: Raise expires with a proto/SPI/dst tuple instead of reqid

4 years agocontroller: Use the CHILD_SA unique_id to terminate CHILD_SAs
Martin Willi [Mon, 27 Oct 2014 13:03:32 +0000 (14:03 +0100)]
controller: Use the CHILD_SA unique_id to terminate CHILD_SAs

4 years agoswanctl: List CHILD_SA unique ID as the primary identifier, but print reqid, too
Martin Willi [Mon, 27 Oct 2014 12:54:51 +0000 (13:54 +0100)]
swanctl: List CHILD_SA unique ID as the primary identifier, but print reqid, too

4 years agostroke: List CHILD_SA unique ID as the primary identifier, but print reqid, too
Martin Willi [Mon, 27 Oct 2014 13:07:14 +0000 (14:07 +0100)]
stroke: List CHILD_SA unique ID as the primary identifier, but print reqid, too

4 years agovici: Include the CHILD_SA unique ID in list-sa event
Martin Willi [Mon, 27 Oct 2014 12:51:59 +0000 (13:51 +0100)]
vici: Include the CHILD_SA unique ID in list-sa event

4 years agoike: Maintain per-IKE_SA CHILD_SAs in the global CHILD_SA manager
Martin Willi [Thu, 23 Oct 2014 14:52:25 +0000 (16:52 +0200)]
ike: Maintain per-IKE_SA CHILD_SAs in the global CHILD_SA manager

4 years agochild-sa-manager: Add a global manager storing CHILD_SA relations
Martin Willi [Thu, 23 Oct 2014 13:42:21 +0000 (15:42 +0200)]
child-sa-manager: Add a global manager storing CHILD_SA relations

To quickly check out IKE_SAs and find associated CHILD_SAs, the
child_sa_manager stores relations between CHILD_SAs and IKE_SAs. It provides
CHILD_SA specific IKE_SA checkout functions wrapping the ike_sa_manager.

4 years agochild-sa: Replace reqid based marks by "unique" marks
Martin Willi [Thu, 13 Nov 2014 14:26:10 +0000 (15:26 +0100)]
child-sa: Replace reqid based marks by "unique" marks

As we now use the same reqid for multiple CHILD_SAs with the same selectors,
having marks based on the reqid makes not that much sense anymore. Instead we
use unique marks that use a custom identifier. This identifier is reused during
rekeying, keeping the marks constant for any rule relying on it (for example
installed by updown).

This also simplifies handling of reqid allocation, as we do not have to query
the marks that is not yet assigned for an unknown reqid.

4 years agochild-sa: Introduce a unique CHILD_SA identifier
Martin Willi [Thu, 23 Oct 2014 09:27:25 +0000 (11:27 +0200)]
child-sa: Introduce a unique CHILD_SA identifier

As the reqid is not that unique even among multiple IKE_SAs anymore, we need
an identifier to uniquely identify a specific CHILD_SA instance.

4 years agochild-sa: Delegate reqid allocation to the kernel interface
Martin Willi [Tue, 21 Oct 2014 09:36:18 +0000 (11:36 +0200)]
child-sa: Delegate reqid allocation to the kernel interface

4 years agokernel-interface: Add reqid allocation and release functions
Martin Willi [Wed, 12 Nov 2014 16:22:45 +0000 (17:22 +0100)]
kernel-interface: Add reqid allocation and release functions

To reassign reqids where appropriate, we explicitly allocate or confirm them
centrally on the kernel-interface.

Currently the state is stored in the kernel-interface wrapper for all
backends, but we may add appropriate methods to each backend to implement
a custom reqid allocation logic, if required.

4 years agotraffic-selector: Add a hash() method
Martin Willi [Thu, 23 Oct 2014 09:19:03 +0000 (11:19 +0200)]
traffic-selector: Add a hash() method

4 years agochild-sa: Sort traffic selectors after adding CHILD_SA policies
Martin Willi [Thu, 19 Feb 2015 17:03:08 +0000 (18:03 +0100)]
child-sa: Sort traffic selectors after adding CHILD_SA policies

Having traffic selectors sorted properly makes comparing them much simpler.

4 years agounit-tests: Add an initial set of traffic selector unit tests
Martin Willi [Thu, 19 Feb 2015 17:02:25 +0000 (18:02 +0100)]
unit-tests: Add an initial set of traffic selector unit tests

4 years agotraffic-selector: Add a compare function to sort traffic selectors
Martin Willi [Thu, 19 Feb 2015 17:01:38 +0000 (18:01 +0100)]
traffic-selector: Add a compare function to sort traffic selectors

4 years agochild-sa: Remove the obsolete update logic
Martin Willi [Fri, 17 Oct 2014 13:44:06 +0000 (15:44 +0200)]
child-sa: Remove the obsolete update logic

The kernel backend uses an inbound parameter these days, where it makes
no sense to pass the update flag. The kernel backend decides itself how
it handles SA installation based on the inbound flag.

4 years agokernel-interface: Pass full list of traffic selectors to add_sa()
Martin Willi [Wed, 15 Oct 2014 16:03:31 +0000 (18:03 +0200)]
kernel-interface: Pass full list of traffic selectors to add_sa()

While we can handle the first selector only in BEET mode in kernel-netlink,
passing the full list gives the backend more flexibility how to handle this
information.

4 years agolibipsec: Remove unused src/dst_ts parameters from ipsec_sa_mgr_t.add_sa()
Martin Willi [Wed, 15 Oct 2014 16:02:46 +0000 (18:02 +0200)]
libipsec: Remove unused src/dst_ts parameters from ipsec_sa_mgr_t.add_sa()

4 years agokernel-pfkey: Don't update during add_sa(), but delete SPI allocation state
Martin Willi [Fri, 17 Oct 2014 12:31:32 +0000 (14:31 +0200)]
kernel-pfkey: Don't update during add_sa(), but delete SPI allocation state

4 years agokernel-interface: Remove reqid parameter from get_spi/get_cpi() methods
Martin Willi [Wed, 15 Oct 2014 15:22:55 +0000 (17:22 +0200)]
kernel-interface: Remove reqid parameter from get_spi/get_cpi() methods

The reqid is not strictly required, as we set the reqid with the update
call when installing the negotiated SA.

If we don't need a reqid at this stage, we can later allocate the reqid in
the kernel backend once the SA parameters have been fully negotaited. This
allows us to assign the same reqid for the same selectors to avoid conflicts
on backends this is necessary.

4 years agolibipsec: Remove unused reqid parameter from ipsec_sa_mgr_t.get_spi()
Martin Willi [Wed, 15 Oct 2014 15:19:56 +0000 (17:19 +0200)]
libipsec: Remove unused reqid parameter from ipsec_sa_mgr_t.get_spi()

4 years agolibtls: Don't send TLS close notifies in EAP after application succeeds
Martin Willi [Thu, 5 Feb 2015 08:13:57 +0000 (09:13 +0100)]
libtls: Don't send TLS close notifies in EAP after application succeeds

With the introduction of PT-TLS, we started sending TLS close notifies after
the application layer completes (7bbf7aa9). While this makes sense for TCP based
transports, it is not required in EAP methods. In EAP, handshake completion
can be directly signaled using the outer EAP-SUCCESS message. This also saves
one round-trip in the EAP exchange.

Windows 7/8 does not seem to like TLS close notifies at all in EAP, and either
stalls (EAP-TTLS) or disconnects (PEAP).

Fixes #556.

4 years agoha: Perform child rekeying outside of CHILD_SA enumerator
Thomas Egerer [Wed, 4 Feb 2015 11:47:03 +0000 (12:47 +0100)]
ha: Perform child rekeying outside of CHILD_SA enumerator

When rekey_child_sa is called while enumerating the children of an IKE_SA, and
the child to be rekeyed is redundant a QUICK_DELETE task is queued instead of a
QUICK_MODE task. This alters the IKE_SA's list of children (ike_sa_t::child_sas)
invalidating the current element of the child_sa_enumerator. The enumerate
function of linked_list_t will then advance to an element with unpredictable
contents most likely resulting in an segmentation violation. A similar behavior
should be observed when delete_child_sa is called.

This patch creates a list of protocol/spi values while holding the
child_sa_enumerator and performs the rekeying (deletion of redundant) chlidren
after releasing the enumerator.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
4 years agomem-pool: Document reassign_online option
Tobias Brunner [Thu, 12 Feb 2015 11:17:48 +0000 (12:17 +0100)]
mem-pool: Document reassign_online option

4 years agoman: Document IKEv2 fragmentation in ipsec.conf(5)
Tobias Brunner [Tue, 10 Feb 2015 17:29:41 +0000 (18:29 +0100)]
man: Document IKEv2 fragmentation in ipsec.conf(5)

4 years agoconfigure: Load SQL backends after crypto plugins
Tobias Brunner [Tue, 10 Feb 2015 15:08:09 +0000 (16:08 +0100)]
configure: Load SQL backends after crypto plugins

If the MySQL client library is linked against OpenSSL the mysql plugin
will cause a segmentation fault when it is unloaded after the openssl
plugin has already been deinitialized.  This is very similar to the issues
with curl (see 44b6a34d438f).

Fixes #814.

4 years agostroke: Double the stroke message string buffer size
Martin Willi [Fri, 6 Feb 2015 15:43:33 +0000 (16:43 +0100)]
stroke: Double the stroke message string buffer size

4 years agostarter: Fail sending stroke message if a string exceeds the buffer size
Martin Willi [Fri, 6 Feb 2015 15:37:09 +0000 (16:37 +0100)]
starter: Fail sending stroke message if a string exceeds the buffer size

Instead of silently setting the string value to NULL, we fail completely in
sending the message to notify the user.

Fixes #844.

4 years agox509: Fix public key reference leak if authority key identifier does not match
Martin Willi [Fri, 6 Feb 2015 12:58:58 +0000 (13:58 +0100)]
x509: Fix public key reference leak if authority key identifier does not match

4 years agovici: Fix ruby gem author email
Martin Willi [Thu, 22 Jan 2015 14:00:45 +0000 (15:00 +0100)]
vici: Fix ruby gem author email

4 years agotrusted_enumerate requires an additional argument
Andreas Steffen [Wed, 21 Jan 2015 22:54:33 +0000 (23:54 +0100)]
trusted_enumerate requires an additional argument

4 years agovici: Fix README example encoding element type values, off by one
Martin Willi [Wed, 21 Jan 2015 08:31:24 +0000 (09:31 +0100)]
vici: Fix README example encoding element type values, off by one

While we fixed the wrong values in the description with d39e04b5, the example
values are still off by one.

Fixes #828.

4 years agolibtls: Check for CHANGE_CIPHER_SPEC type only if upper layer returns NEED_MORE
Martin Willi [Thu, 8 Jan 2015 10:06:45 +0000 (11:06 +0100)]
libtls: Check for CHANGE_CIPHER_SPEC type only if upper layer returns NEED_MORE

A type is returned only if upper layers successfully created a record, that is
returns NEED_MORE. If we do not check for the return value, we might check a
previous record or the uninitialized type variable and falsely reset the
sequence number.

4 years agostarter: Fix mark_out.mask in starter_cmp_conn()
Maks Naumov [Fri, 9 Jan 2015 22:44:36 +0000 (00:44 +0200)]
starter: Fix mark_out.mask in starter_cmp_conn()

4 years ago_updown: Remove obsolete man pages
Tobias Brunner [Mon, 5 Jan 2015 12:44:16 +0000 (13:44 +0100)]
_updown: Remove obsolete man pages

4 years agoUpdated RFC3779 certificates 5.2.2
Andreas Steffen [Sun, 28 Dec 2014 11:53:16 +0000 (12:53 +0100)]
Updated RFC3779 certificates

4 years agoVersion bump to 5.2.2
Andreas Steffen [Fri, 19 Dec 2014 09:03:54 +0000 (10:03 +0100)]
Version bump to 5.2.2

4 years agounit-tests: Adapted to coverity fixes
Andreas Steffen [Thu, 18 Dec 2014 14:51:13 +0000 (15:51 +0100)]
unit-tests: Adapted to coverity fixes

4 years agoFixed bad bit shift and sign extension errors
Andreas Steffen [Wed, 17 Dec 2014 17:16:26 +0000 (18:16 +0100)]
Fixed bad bit shift and sign extension errors

4 years agobliss: Remove unnecessary cast to double
Tobias Brunner [Mon, 15 Dec 2014 17:55:03 +0000 (18:55 +0100)]
bliss: Remove unnecessary cast to double

Coverity is still not happy when the result of an integer division is
assigned to a double (without e.g. casting the result to an int first to
indicate the intent).  The shift should avoid this issue.

4 years agobliss: Log type if unsupported
Tobias Brunner [Mon, 15 Dec 2014 17:54:59 +0000 (18:54 +0100)]
bliss: Log type if unsupported

4 years agobliss: Make sure sampler exists after checking for it earlier
Tobias Brunner [Mon, 15 Dec 2014 17:30:31 +0000 (18:30 +0100)]
bliss: Make sure sampler exists after checking for it earlier

4 years agopts: Do not override status with SUCCESS if length is invalid
Tobias Brunner [Mon, 15 Dec 2014 17:18:40 +0000 (18:18 +0100)]
pts: Do not override status with SUCCESS if length is invalid

4 years agoNEWS: Added info about CVE-2014-9221
Tobias Brunner [Thu, 18 Dec 2014 15:15:03 +0000 (16:15 +0100)]
NEWS: Added info about CVE-2014-9221

4 years agoikev2: Only touch the DH object if we have a matching proposal
Tobias Brunner [Mon, 15 Dec 2014 13:25:04 +0000 (14:25 +0100)]
ikev2: Only touch the DH object if we have a matching proposal

4 years agocrypto: Define MODP_CUSTOM outside of IKE DH range
Tobias Brunner [Mon, 1 Dec 2014 16:21:59 +0000 (17:21 +0100)]
crypto: Define MODP_CUSTOM outside of IKE DH range

Before this fix it was possible to crash charon with an IKE_SA_INIT
message containing a KE payload with DH group MODP_CUSTOM(1025).
Defining MODP_CUSTOM outside of the two byte IKE DH identifier range
prevents it from getting negotiated.

Fixes CVE-2014-9221.

4 years agopki: Document correct output formats for --pkcs12 --export
Tobias Brunner [Fri, 19 Dec 2014 15:30:47 +0000 (16:30 +0100)]
pki: Document correct output formats for --pkcs12 --export

4 years agopki: Properly clean up if output format for --pkcs12 is wrong
Tobias Brunner [Fri, 19 Dec 2014 15:30:10 +0000 (16:30 +0100)]
pki: Properly clean up if output format for --pkcs12 is wrong

4 years agokernel-netlink: Add missing documentation for two options
Tobias Brunner [Fri, 19 Dec 2014 14:36:01 +0000 (15:36 +0100)]
kernel-netlink: Add missing documentation for two options

4 years agoMerge branch 'osx-app'
Martin Willi [Thu, 18 Dec 2014 08:50:50 +0000 (09:50 +0100)]
Merge branch 'osx-app'

Mainline the OS X App providing the graphical user interface for the charon-xpc
privileged helper.

4 years agoosx: Update the README with App related bits
Martin Willi [Tue, 16 Dec 2014 16:14:38 +0000 (17:14 +0100)]
osx: Update the README with App related bits

4 years agoosx: Initial import of the Objective-C App graphical user interface
Martin Willi [Tue, 16 Dec 2014 16:13:44 +0000 (17:13 +0100)]
osx: Initial import of the Objective-C App graphical user interface

4 years agoapple: Redefine some additional clashing Mach types
Martin Willi [Tue, 16 Dec 2014 15:55:29 +0000 (16:55 +0100)]
apple: Redefine some additional clashing Mach types

While they usually are not included in a normal strongSwan build, the XPC
header indirectly defines these Mach types. To build charon-xpc, which uses
both XPC and strongSwan includes, we have to redefine these types.

4 years agokernel-pfroute: If a new interface appears, slightly delay address enumeration
Martin Willi [Fri, 24 Oct 2014 13:21:11 +0000 (15:21 +0200)]
kernel-pfroute: If a new interface appears, slightly delay address enumeration

On OS X 10.10, when installing a virtual IP on a tun device, there is a chance
that a RTM_IFANNOUNCE is sent before the IP is ready on that link when calling
getifaddrs(). As we don't get an RTM_NEWADDR event either, that race lets us
miss the virtual IP install event, failing the add_ip() call.

4 years agocharon-xpc: Add a work-around to trigger IP address add events after boot
Martin Willi [Tue, 16 Dec 2014 15:58:17 +0000 (16:58 +0100)]
charon-xpc: Add a work-around to trigger IP address add events after boot

4 years agomgf1: Use correct Doxygen groups
Tobias Brunner [Mon, 15 Dec 2014 16:20:13 +0000 (17:20 +0100)]
mgf1: Use correct Doxygen groups

4 years agobliss: Fix Doxygen comments
Tobias Brunner [Mon, 15 Dec 2014 16:19:44 +0000 (17:19 +0100)]
bliss: Fix Doxygen comments

4 years agoFixed some typos, courtesy of codespell
Tobias Brunner [Mon, 15 Dec 2014 16:11:14 +0000 (17:11 +0100)]
Fixed some typos, courtesy of codespell

4 years agokernel-pfkey: Fix replay window size on FreeBSD and Mac OS X
Tobias Brunner [Thu, 4 Dec 2014 15:21:45 +0000 (16:21 +0100)]
kernel-pfkey: Fix replay window size on FreeBSD and Mac OS X

The FreeBSD and Mac OS X kernels interpret sadb_sa_replay as the size of the
replay window in bytes.  Linux on the other hand does the same for PF_KEY it
does for XFRM so sadb_sa_replay denotes the number of packets/bits in the
window.  Similarly, the window size on Linux is limited to 32 by the four
byte default bitmap used for IPsec SAs (may only be changed with
XFRMA_REPLAY_ESN_VAL), which is not the case on the other platforms.

4 years agoUpdated BLISS CA certificate in ikev2/rw-ntru-bliss scenario 5.2.2rc1
Andreas Steffen [Fri, 12 Dec 2014 12:55:03 +0000 (13:55 +0100)]
Updated BLISS CA certificate in ikev2/rw-ntru-bliss scenario

4 years agoAlso initialize s_sign
Andreas Steffen [Fri, 12 Dec 2014 12:24:11 +0000 (13:24 +0100)]
Also initialize s_sign

4 years agopem: Handle BER indefinite length encoding as binary ASN.1
Martin Willi [Tue, 9 Dec 2014 13:19:39 +0000 (14:19 +0100)]
pem: Handle BER indefinite length encoding as binary ASN.1

While our ASN.1 parser can't handle BER indefinite length encoding, the OpenSSL
backend can. Some PKCS#12 containers get encoded this way, so we should
support loading such files in the pem plugin.

4 years agopki: Add command to export certificates and keys from PKCS#12 containers
Tobias Brunner [Tue, 9 Dec 2014 11:54:03 +0000 (12:54 +0100)]
pki: Add command to export certificates and keys from PKCS#12 containers

4 years agopki: Reformat PKCS#12 output and add an index for each certificate/key
Tobias Brunner [Tue, 9 Dec 2014 10:40:12 +0000 (11:40 +0100)]
pki: Reformat PKCS#12 output and add an index for each certificate/key

4 years agopki: Add simple PKCS#12 display command
Tobias Brunner [Fri, 5 Dec 2014 09:41:07 +0000 (10:41 +0100)]
pki: Add simple PKCS#12 display command

4 years agopki: Load hmac plugin which is required to decrypt PKCS#12 containers
Tobias Brunner [Fri, 5 Dec 2014 09:39:03 +0000 (10:39 +0100)]
pki: Load hmac plugin which is required to decrypt PKCS#12 containers

4 years agopki: Cache entered secrets in case they are needed more than once
Tobias Brunner [Fri, 5 Dec 2014 09:38:30 +0000 (10:38 +0100)]
pki: Cache entered secrets in case they are needed more than once

4 years agoike: Allow creation of internally used payloads
Tobias Brunner [Fri, 12 Dec 2014 11:39:44 +0000 (12:39 +0100)]
ike: Allow creation of internally used payloads

Since 42e0a317c64b ("ike: Only parse payloads valid for the current IKE
version") payload types are checked before creating objects.  This check
failed for internally used payload types (e.g. proposal substructures),
which have a type >= 256, i.e. outside the IKE payload type range.

4 years agoCache only support fingerprint types
Andreas Steffen [Fri, 12 Dec 2014 12:08:40 +0000 (13:08 +0100)]
Cache only support fingerprint types

4 years agoFix ambiguities and gcc compiler warning
Andreas Steffen [Fri, 12 Dec 2014 11:48:23 +0000 (12:48 +0100)]
Fix ambiguities and gcc compiler warning

4 years agoapple: Use precancelable poll() to wrap accept/recvmsg calls
Martin Willi [Fri, 12 Dec 2014 11:05:24 +0000 (12:05 +0100)]
apple: Use precancelable poll() to wrap accept/recvmsg calls

To make accept/recvmsg cancelable, we wrap them with poll. As poll itself
does not honor pending cancellations when entering the function, we use our
variant that checks for pending cancellation requests before entering poll().

4 years agoVersion bump to 5.2.2rc1
Andreas Steffen [Fri, 12 Dec 2014 11:00:04 +0000 (12:00 +0100)]
Version bump to 5.2.2rc1

4 years agoUpdated BLISS scenario keys and certificates to new format
Andreas Steffen [Fri, 12 Dec 2014 07:25:45 +0000 (08:25 +0100)]
Updated BLISS scenario keys and certificates to new format

4 years agoUse bitspender->get_bytes() method in ntru_trits
Andreas Steffen [Thu, 11 Dec 2014 21:30:29 +0000 (22:30 +0100)]
Use bitspender->get_bytes() method in ntru_trits

4 years agoUse Huffman code in BLISS signature
Andreas Steffen [Thu, 11 Dec 2014 16:11:17 +0000 (17:11 +0100)]
Use Huffman code in BLISS signature