Commit Graph
19030 Commits
Author SHA1 Message Date
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
Tobias Brunner 4141f01671 ikev1: Accept IPComp proposals with 4 octet long CPI values
While they SHOULD be sent as 16-bit values according to RFC 3173
a responder MUST be able to accept CPI values encoded in four bytes.
2014-12-05 15:48:52 +01:00
Tobias Brunner 42e0a317c6 ike: Only parse payloads valid for the current IKE version 2014-12-05 15:41:47 +01:00
Tobias Brunner fac310a467 ike: Make check for known payloads depend on IKE version 2014-12-05 15:41:46 +01:00
Tobias Brunner 7bd5548538 pkcs5: Add support for PBES2 encryption schemes other than 3DES
This allows using e.g. AES for PKCS#8 and PKCS#12 files.

Some legacy schemes defined in RFC 2898 are not supported (like RC2).

Fixes #740.
2014-12-05 14:35:50 +01:00
Tobias Brunner 5743f6df2f asn1: Add OID for Blowfish CBC
The OID (1.3.6.1.4.1.3029.1.2) is technically not correct, the correct
one is (1.3.6.1.4.1.3029.1.1.2).  Every other library or tool (like OpenSSL)
uses the incorrect one so we do the same.

References #740.
2014-12-05 14:35:41 +01:00
Martin Willi 0a5b60db20 diffie-hellman: Handle dh_exponent_ansi_x9_42 as a boolean setting
While it was always documented as boolean setting, the option is currently
handled as integer value, for which yes/no values do not work. Instead the
default of TRUE is used for a no value.

The option has been moved a lot during the last years, and in some locations
was handled as bool, in some as integer. In the latest codebase it
congruently used integer, which is actually not what is documented and used
in testing.

Fixes #781.
2014-12-05 14:00:36 +01:00
Tobias Brunner 02df52fd2b unity: Only do narrowing of responder's TS if we received 0.0.0.0/0
iOS and Mac OS X clients establish individual IPsec SAs for the traffic
selectors received in Split-Include attributes (might have been different
in earlier releases).  If we return 0.0.0.0/0 as TSr that either results
in a bunch of Quick Mode exchanges (for each TS), or with the latest
client releases an error notify (ATTRIBUTES_NOT_SUPPORTED).
We also can't install the IPsec SA with all configured subnets as that
would cause conflicts if the client later negotiates SAs for other subnets,
which iOS 8 does based on traffic to such subnets.

For Shrew and the Cisco client, which propose 0.0.0.0/0, we still need to
override the narrowed TS with 0.0.0.0/0, as they otherwise won't accept
the Quick Mode response.  Likewise, we also have to narrow the TS before
installing the IPsec SAs and policies.

So we basically have to follow the client's proposal and only modify TSr
if we received 0.0.0.0/0.  Since we don't get the original TS in the
narrow hook we handle the inbound QM messages and make note of IKE_SAs on
which we received a TSr of 0.0.0.0/0.

Fixes #737.
2014-12-05 10:12:46 +01:00