Commit Graph
13737 Commits
Author SHA1 Message Date
Tobias Brunner fd19feefa4 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.
2014-12-23 15:40:01 +01:00
Tobias Brunner 078fe7aae6 bliss: Log type if unsupported 2014-12-23 15:40:01 +01:00
Tobias Brunner a8e82ace8a bliss: Make sure sampler exists after checking for it earlier 2014-12-23 15:40:01 +01:00
Tobias Brunner 027c19b097 pts: Do not override status with SUCCESS if length is invalid 2014-12-23 15:40:01 +01:00
Tobias Brunner 919449a3f1 NEWS: Added info about CVE-2014-9221 2014-12-23 15:40:01 +01:00
Tobias Brunner 691d00f166 ikev2: Only touch the DH object if we have a matching proposal 2014-12-23 15:40:01 +01:00
Tobias Brunner e13ef5c434 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.
2014-12-23 15:40:01 +01:00
Tobias Brunner 6683cf6a5a pki: Document correct output formats for --pkcs12 --export 2014-12-19 16:31:36 +01:00
Tobias Brunner a6c0dec0e5 pki: Properly clean up if output format for --pkcs12 is wrong 2014-12-19 16:30:10 +01:00
Tobias Brunner 8edea13a5a kernel-netlink: Add missing documentation for two options 2014-12-19 15:36:01 +01:00
Martin Willi 55e7a0cafb Merge branch 'osx-app'
Mainline the OS X App providing the graphical user interface for the charon-xpc
privileged helper.
2014-12-18 09:50:50 +01:00
Martin Willi 7f82a8f34b osx: Update the README with App related bits 2014-12-17 16:54:28 +01:00
Martin Willi dacd667c84 osx: Initial import of the Objective-C App graphical user interface 2014-12-17 16:53:45 +01:00
Martin Willi 04337fed02 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.
2014-12-16 17:22:28 +01:00
Martin Willi 6fa203b8d4 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.
2014-12-16 17:22:28 +01:00
Martin Willi 1c6188a0c2 charon-xpc: Add a work-around to trigger IP address add events after boot 2014-12-16 17:22:27 +01:00
Tobias Brunner f9da7ef868 mgf1: Use correct Doxygen groups 2014-12-15 17:22:11 +01:00
Tobias Brunner a876018e3e bliss: Fix Doxygen comments 2014-12-15 17:19:57 +01:00
Tobias Brunner 3000f6aada Fixed some typos, courtesy of codespell 2014-12-15 17:11:14 +01:00
Tobias Brunner d21b01462e 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.
2014-12-15 16:09:15 +01:00
Andreas Steffen ac0cb2d363 Updated BLISS CA certificate in ikev2/rw-ntru-bliss scenario 2014-12-12 13:55:03 +01:00
Andreas Steffen 9b4e411c50 Also initialize s_sign 2014-12-12 13:24:11 +01:00
Martin Willi 58cacf0a74 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.
2014-12-12 13:11:29 +01:00
Tobias Brunner 3a26566fa9 pki: Add command to export certificates and keys from PKCS#12 containers 2014-12-12 13:11:29 +01:00
Tobias Brunner c20f962732 pki: Reformat PKCS#12 output and add an index for each certificate/key 2014-12-12 13:11:29 +01:00
Tobias Brunner 374b569ed0 pki: Add simple PKCS#12 display command 2014-12-12 13:11:29 +01:00
Tobias Brunner a23d3073e3 pki: Load hmac plugin which is required to decrypt PKCS#12 containers 2014-12-12 13:11:29 +01:00
Tobias Brunner ec846f9e52 pki: Cache entered secrets in case they are needed more than once 2014-12-12 13:11:29 +01:00
Tobias Brunner 75dd984e9e ike: Allow creation of internally used payloads
Since 42e0a317c6 ("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.
2014-12-12 13:10:26 +01:00
Andreas Steffen 3e654a13ee Cache only support fingerprint types 2014-12-12 13:08:40 +01:00
Andreas Steffen 8aaf36c6e3 Fix ambiguities and gcc compiler warning 2014-12-12 12:48:31 +01:00
Martin Willi 6e4620adfb 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().
2014-12-12 12:08:34 +01:00
Andreas Steffen dce6f69546 Version bump to 5.2.2rc1 2014-12-12 12:00:20 +01:00
Andreas Steffen c44f481ae0 Updated BLISS scenario keys and certificates to new format 2014-12-12 12:00:20 +01:00
Andreas Steffen 881cffb826 Use bitspender->get_bytes() method in ntru_trits 2014-12-12 12:00:20 +01:00
Andreas Steffen 83447555a6 Use Huffman code in BLISS signature 2014-12-12 12:00:20 +01:00
Andreas Steffen 9394e26426 Include design parameters in generated Huffman code files 2014-12-12 12:00:20 +01:00
Tobias Brunner 700df23886 bliss: Fix monolithic build
This requires moving test files so that the Makefile for the tests can be
included after building libstrongswan, which requires the plugin when
building monolithically.  Due to this a static helper library is required
as directly referring to object files (or source files) is not possible.

It's also necessary to avoid any link-time dependency on libstrongswan in
bliss_huffman, to avoid circular dependencies (bliss_huffman -> libstrongswan
-> bliss -> bliss_huffman).
2014-12-12 12:00:20 +01:00
Tobias Brunner f55a03a2de bliss: Fix compilation warning with certain GCC versions
Theoretically, n could be zero and these variables are then used
uninitialized.  Older GCC versions warn about this and on Travis where we
compile with -Werror this causes the tests to fail.
2014-12-12 12:00:20 +01:00
Martin Willi 108e388580 swanctl: Fail loading a connection if loading a cacert constraint fails 2014-12-12 10:23:59 +01:00
Martin Willi 6855b8b36b vici: Use silent builder destroy function in vici_free_req() 2014-12-12 10:23:59 +01:00
Martin Willi c04ee43af7 vici: Add a destroy method to builder, allowing cancellation without error
When cancelling a builder, finalize throws an error which we might prefer
to avoid.
2014-12-12 10:23:59 +01:00
Martin Willi 971ef077ce eap-radius: Use the single-server legacy server options as fallback 2014-12-12 10:23:59 +01:00
Andreas Steffen 443346f56a Pack private key arrays 2014-12-10 22:45:30 +01:00
Martin Willi 48633b1844 dumm: Fix -Wformat warning in ruby extension
In recent ruby versions, extensions get built with -Wformat. As we use custom
printf specifiers, that does not work for us. As there does not seem to be a
reliable way to override -Wformat, we use a variable for the format string,
which prevents gcc from doing the -Wformat check in that particular situation.
2014-12-10 14:29:19 +01:00
Andreas Steffen df5b2ade59 Automatic generation of optimized Huffman codes 2014-12-09 11:58:18 +01:00
Andreas Steffen 7442d2a208 unit-tests: added bliss_sampler test 2014-12-09 11:58:17 +01:00
Andreas Steffen 03f2a52e9c Expanded bliss_bitpacker to 32 bits 2014-12-09 11:58:17 +01:00
Tobias Brunner 30a90ccf74 NEWS: Add note about AH algorithm mapping 2014-12-09 11:08:50 +01:00
Tobias Brunner 728f529c42 ikev1: Use same map for AH and ESP authentication algorithms
The transform identifier used in AH transforms is not the same as the
authentication algorithm identifier used in the transform attributes in
AH (and ESP) transforms.
2014-12-09 11:08:14 +01:00