Commit Graph
100 Commits
Author SHA1 Message Date
Tobias Brunner 94124456f2 Merge branch 'android-cert-import'
Adds support to import CA and server certificate directly in the app.
On Android 4.4 and newer the SAF allows users to easily browse for such
files, on older systems they have to open them from file manager or the
download app (only works if the MIME type is correctly detected).

Also adds support for ECDSA keys on recent Android systems.
2014-07-22 10:51:32 +02:00
Tobias Brunner d4bf6bfb15 android: Do not use deprecated TwoLineListItem 2014-07-22 10:41:51 +02:00
Tobias Brunner 7073bfe4e9 android: Add support for ECDSA private keys
With 4.4.4 these work fine now.
2014-07-22 10:41:51 +02:00
Tobias Brunner 3dc92ff9cf android: Show a confirmation dialog before importing certificates
Since the import activity can be triggered by any other app on the
system we shouldn't just import every certificate we get.

Also, in some situations (e.g. if no passphrase has been set yet for the
system-wide certificate store) we are the only application that can open
certificate files.  So if a user clicked on a certificate file she would
just get a confirmation Toast about a successful import, with no indication
whatsoever where the certificate was actually imported.  The new dialog
shows the app icon to indicate that strongSwan is involved.
2014-07-22 10:41:51 +02:00
Tobias Brunner 1ed922c918 android: Use Storage Access Framework to import certificates
Thanks to the SAF, introduced with Android 4.4, browsing and opening
files on the system is very easy to implement.

On older systems the menu option is removed.
2014-07-22 10:41:51 +02:00
Tobias Brunner 94cc8f6a72 android: Add activity to import certificate files
Such files can e.g. be opened from the Download view, if they are
associated with one of the supported mime-types.
2014-07-22 10:41:50 +02:00
Tobias Brunner ac200bcda5 android: Imported certificates may be clicked to delete them 2014-07-22 10:41:50 +02:00
Tobias Brunner eb01649079 android: Reload CA certificates without AsyncTask
We already use loaders in the GUI that can handle this asynchronously.
2014-07-22 10:41:50 +02:00
Tobias Brunner 918200378d android: Change how CA certificate reloads are initiated 2014-07-22 10:41:50 +02:00
Tobias Brunner 08de6a08f0 android: Add option to reload CA certificates to TrustedCertificatesActivity 2014-07-22 10:41:50 +02:00
Tobias Brunner 2312985b2a android: Replace option to reload CA certificates with CA certificate view
The reload option will be added there.
2014-07-22 10:41:50 +02:00
Tobias Brunner 1353f08fbc android: Only close TrustedCertificatesActivity on click when selecting a certificate 2014-07-22 10:41:50 +02:00
Tobias Brunner 9c841b1f34 android: Set action when using TrustedCertificatesActivity to select a certificate 2014-07-22 10:41:50 +02:00
Tobias Brunner f21a69dbec android: Allow selection of local certificates 2014-07-22 10:41:49 +02:00
Tobias Brunner 3b2b536b70 android: Change how CA certificates from different sources are accessed 2014-07-22 10:41:49 +02:00
Tobias Brunner 8cdce00eb1 android: Cache certificates from multiple KeyStores
Including the new local one.
2014-07-22 10:41:49 +02:00
Tobias Brunner 8d3a058abc android: Register local certificate store provider when the app is initialized 2014-07-22 10:41:49 +02:00
Tobias Brunner 5eb4297046 android: Add Provider for the local certificate store 2014-07-22 10:41:49 +02:00
Tobias Brunner 544267889e android: Add KeyStoreSpi implementation that uses LocalCertificateStore 2014-07-22 10:41:49 +02:00
Tobias Brunner 275888d255 android: Add local certificate store
The class manages certificates stored in files within the app's
private data directory.
2014-07-22 10:41:49 +02:00
Tobias Brunner 463a6cd005 android: Move TrustedCertificateEntry to a new package 2014-07-22 10:41:49 +02:00
Tobias Brunner 6684195505 android: Subclass Application to provide static access to the application context 2014-07-22 10:41:49 +02:00
Tobias Brunner 7229bdd5c7 android: Target latest SDK version 2014-07-22 10:41:49 +02:00
Tobias Brunner 140ce41a39 android: Add utility method to convert a byte array to a hex string 2014-07-22 10:41:48 +02:00
Tobias Brunner 9d994ba5ea android: Remove unused hash argument from getTrustedCertificates() 2014-07-22 10:41:48 +02:00
Tobias Brunner b9fd95f476 android: Use correct tag to define category for CREATE_SHORTCUT intent-filter 2014-07-22 10:41:48 +02:00
Tobias Brunner d962b25bcb starter: Fix memory leaks and warn if conn/ca sections are ignored due to parse errors 2014-07-18 17:15:15 +02:00
Tobias Brunner b906d41214 man: Document where left|rightsigkey searches for public key files 2014-07-14 10:58:28 +02:00
Tobias Brunner 3d2b36b812 NEWS: Updated URL to swidGenerator 2014-07-07 17:54:02 +02:00
Tobias Brunner 44870e5313 xauth-pam: Add workaround for null-terminated passwords
Fixes #631.
2014-07-07 11:14:02 +02:00
Tobias Brunner 118b2879aa winhttp: Do not use countof() on pointer argument 2014-07-02 12:38:45 +02:00
Tobias Brunner 831045ef45 optionsfrom: Properly handle errors when determining file size 2014-07-02 12:38:45 +02:00
Tobias Brunner e44223dbcc windows: Fix off-by-one error in strerror_s_extended() 2014-07-02 12:38:45 +02:00
Tobias Brunner 0026600bfe windows: accept() socket handle could theoretically be 0 2014-07-02 12:38:45 +02:00
Tobias Brunner babe9e4f45 windows: Close correct socket when opening second socket fails in socketpair() 2014-07-02 12:38:44 +02:00
Tobias Brunner 0a26f39a71 windows: Make sure the string returned from ReadConsole() is null terminated 2014-07-02 12:38:44 +02:00
Tobias Brunner 32a262e7a1 windows: Remove useless assignment in put_thread() 2014-07-02 12:12:05 +02:00
Tobias Brunner 0e48f67562 backtrace: Remove name checks after SymFromAddr() calls
The Name member is an array whose address is always defined.
2014-07-02 12:11:59 +02:00
Tobias Brunner fbe462e1b0 pts: Avoid integer overflow when reading file names in the old IMA format 2014-07-01 17:58:36 +02:00
Tobias Brunner ecb55b4639 imv-attestation: Avoid memory leak when skipping unsupported work items 2014-07-01 17:58:36 +02:00
Tobias Brunner 530d87be1b pts: Use memchr(3) instead of strchr(3) to extract hash algorithm name
The string read with read(2) might not be null terminated.
2014-07-01 17:58:36 +02:00
Tobias Brunner f82d7aff85 swid: fgets(3) returns a pointer to the read string or NULL 2014-07-01 17:58:36 +02:00
Tobias Brunner 1be2b84124 parser-helper: Ensure file_next() does not remove the sentinel item 2014-07-01 17:58:36 +02:00
Tobias Brunner 8b123d2e4a man: Document replay_window ipsec.conf option 2014-06-30 14:50:32 +02:00
Tobias Brunner 28a79e4e0c stroke: Don't log unspecified options of conn and ca sections 2014-06-30 13:29:26 +02:00
Tobias Brunner e79dbda390 utils: Helper macros to define overloaded macros based on number of arguments 2014-06-30 13:29:26 +02:00
Tobias Brunner ba2805c106 pki: Document --online option for pki --verify and all exit codes 2014-06-30 13:25:13 +02:00
Tobias Brunner 33967467e2 conf: Document load-tester.crl option 2014-06-30 13:25:13 +02:00
Tobias Brunner da7cb76974 conf: Document charon.*-scripts options 2014-06-30 13:25:13 +02:00
Tobias Brunner 38f27e172c conf: Document swanctl options 2014-06-30 13:25:13 +02:00
Tobias Brunner 4d066ef7fc conf: Document aikgen options 2014-06-30 13:25:13 +02:00
Tobias Brunner 3986c1e3fd autoconf: Replace --disable-tools option with --disable-scepclient
Since using a separate option for pki this was the only tool that was still
enabled by that option.
2014-06-30 13:25:13 +02:00
Tobias Brunner 45f647c9cd checksum: Fix checksum generation for pki if tools are disabled 2014-06-30 13:25:13 +02:00
Tobias Brunner 01e48ddd59 doc: Remove obsolete architecture description and empty known bugs list 2014-06-30 13:16:17 +02:00
Tobias Brunner 0909bf6c0a apidoc: Include *.md and files from the complete source directory (not only src) 2014-06-30 13:16:17 +02:00
Tobias Brunner 891d332b15 Converted existing README to Markdown 2014-06-30 13:16:17 +02:00
Tobias Brunner a477d28017 Move README to README.md so it gets evaluated as Markdown 2014-06-30 13:16:17 +02:00
Tobias Brunner 2eef43f3ee swid: Fix parameter documentation in Doxygen comments 2014-06-30 13:16:17 +02:00
Tobias Brunner e351169900 windows: Fix parameter name in Doxygen comment 2014-06-30 13:16:17 +02:00
Tobias Brunner aad072d517 enum: Replace þ with p in Doxygen comments 2014-06-30 13:16:17 +02:00
Tobias Brunner 3b16c2b55d libvici: Add missing argument to Doxygen comment 2014-06-30 13:16:16 +02:00
Tobias Brunner cc7c4c3dbd starter: Add starter group and fix formatting of conf_parser_section_t enum
Make use of the Markdown support in recent Doxygen versions.
2014-06-30 13:16:16 +02:00
Tobias Brunner 1bd175a9ef swanctl: Fix Doxygen group assignment 2014-06-30 13:16:16 +02:00
Tobias Brunner 00729e16e7 apidoc: Updated Doxyfile.in 2014-06-30 13:16:16 +02:00
Tobias Brunner ed01c1afff Fixed some typos 2014-06-30 13:16:16 +02:00
Tobias Brunner be41910e19 testing: Add sql/shunt-policies-nat-rw scenario 2014-06-26 18:13:26 +02:00
Tobias Brunner 73211f9b74 testing: Add pfkey/shunt-policies-nat-rw scenario 2014-06-26 18:13:26 +02:00
Tobias Brunner f22add05f6 kernel-pfkey: Use address in TS to determine interface for shunt routes 2014-06-26 18:13:17 +02:00
Tobias Brunner 60f5fb2318 kernel-pfkey: Use subnet and prefix when determining nexthop for shunt policy routes
This is basically the same as 88f125f560.
2014-06-26 18:13:09 +02:00
Tobias Brunner b451303a6c kernel-pfkey: Install routes for shunt policies 2014-06-26 18:12:05 +02:00
Tobias Brunner 945e1df738 testing: Remove obsolete shunt-policies scenarios 2014-06-26 18:12:00 +02:00
Tobias Brunner 04ff5e58e3 starter: Ingore %default conn and ca sections 2014-06-26 12:23:05 +02:00
Tobias Brunner 4431e1e04d updown: Force subnet address to be numeric 2014-06-25 16:17:15 +02:00
Tobias Brunner cd6b2af33e kernel-netlink: Cast IPv6 address blobs to the proper type
On Android these macros are defined as functions.
2014-06-24 15:53:25 +02:00
Tobias Brunner 3e4ce88633 android: Define HAVE_DLADDR as plugin loader checks for it 2014-06-24 15:53:25 +02:00
Tobias Brunner 5195416d90 android: Update Android.mk files to match changes due to the Windows port
Makes them easier to compare to the original Makefile.am.
2014-06-24 15:53:25 +02:00
Tobias Brunner 6d4654b9f9 utils: Add wrappers for memcpy(3), memmove(3) and memset(3)
These wrappers guarantee that calls to these functions are noops if the
number of bytes is 0, as calling them with NULL pointers is undefined
according to the C standard, even if the number of bytes is 0 (most
implementations probably ignore the pointers anyway in this case, but
lets make sure).
2014-06-24 15:11:27 +02:00
Tobias Brunner bb91109af8 pki: Also check for MAX_COMMANDS when building getopt_long arguments
Completes 87e53819a6 and 0a8c399a21.
2014-06-24 15:11:27 +02:00
Tobias Brunner a4844dbc8f Merge branch 'algorithm-order'
Restores the behavior we had before 2e22333fb (except for RNGs), that is,
algorithms are stored in the registration order again.  Which is not optimal
as we must rely on plugins to register them in a sensible order, but ordering
them by identifier definitely caused weaker algorithms to be proposed first
in the default proposal, which was even worse.
2014-06-20 16:34:29 +02:00
Tobias Brunner aba9ef542e unit-tests: Add tests for DH factory 2014-06-20 16:21:55 +02:00
Tobias Brunner 94dbbd8079 crypto-factory: Only sort RNGs by algorithm identifier
Others remain in the order in which they were added, grouped by
algorithm identifier and sorted by benchmarking speed, if provided.
2014-06-20 16:21:55 +02:00
Tobias Brunner e145f27db7 unit-tests: Add test for crypto_factory_t's rng_create method 2014-06-20 16:21:55 +02:00
Tobias Brunner 90854d289f kernel-netlink: Install virtual IPv6 addresses as deprecated
This should prevent the kernel's IPv6 source address selection algorithm
from using this address unless it is forced to by our source route.
This is helpful if split tunneling is used.

Fixes #598.
2014-06-20 16:10:40 +02:00
Tobias Brunner 8661c56d38 vici: Install libvici in ipseclibdir like we do with other libraries 2014-06-19 14:42:07 +02:00
Tobias Brunner 93c68fcd26 Merge branch 'shunt-policies-routes'
Fixes #599.
2014-06-19 14:33:50 +02:00
Tobias Brunner 88f125f560 kernel-netlink: Pass prefix when looking up next hop for shunt policies 2014-06-19 14:33:40 +02:00
Tobias Brunner de7cb6de65 kernel-netlink: Add support for destination prefix when determining next hop 2014-06-19 14:33:40 +02:00
Tobias Brunner c005073d0b kernel-interface: Add destination prefix to get_nexthop()
This allows to determine the next hop to reach a subnet, for instance, when
installing routes for shunt policies.
2014-06-19 14:33:40 +02:00
Tobias Brunner 73b22aa842 Merge branch 'passthrough-policies-priority'
Introduces a new priority class for policies, which allows us to install
passthrough policies with a strictly higher priority than IPsec
policies, which was not the case previously depending on the traffic
selectors.
2014-06-19 14:24:48 +02:00
Tobias Brunner 2ef6f57456 testing: Add ikev2/shunt-policies-nat-rw scenario 2014-06-19 14:23:07 +02:00
Tobias Brunner d93987ce24 testing: Remove ikev2/shunt-policies scenario
This scenario doesn't really apply anymore (especially its use of drop
policies).
2014-06-19 14:23:07 +02:00
Tobias Brunner 981466251f shunt-manager: Install passthrough policies with highest priority
This avoids conflicts with regular IPsec policies.

Similarly, use the lowest priority for drop policies.
2014-06-19 14:20:33 +02:00
Tobias Brunner 5b883719a1 libipsec: Add support for new policy priority class 2014-06-19 14:20:33 +02:00
Tobias Brunner 77b6a145a0 kernel-pfkey: Add support for new policy priority class 2014-06-19 14:20:33 +02:00
Tobias Brunner f1675e4e29 kernel-netlink: Add support for new policy priority class 2014-06-19 14:20:33 +02:00
Tobias Brunner 479060d2d6 ipsec: Add a fourth priority class for bypass policies 2014-06-19 14:20:33 +02:00
Tobias Brunner 566d1a90cd Remove kernel-klips plugin 2014-06-19 14:20:33 +02:00
Tobias Brunner 3bf98189d7 kernel-netlink: Follow RFC 6724 when selecting IPv6 source addresses
Instead of using the first address we find on an interface we should
consider properties like an address' scope or whether it is temporary
or public.

Fixes #543.
2014-06-19 14:16:41 +02:00
Tobias Brunner 6364219281 Merge branch 'ipsec.conf-parser'
Replaces the ipsec.conf parser in starter.  The new parser is also based
on flex/bison but it simply returns key/value collections of all sections.
It already resolves also= and allows overriding options in all included
sections (not only %default), options set in included section can also
be cleared again (key=).  It provides other improvements too, like quoted
strings	(with escape sequences), unlimited includes and better
whitespace/comment handling.

Fixes #423.
Fixes #560.
2014-06-19 14:09:09 +02:00
Tobias Brunner f4d29bf16d starter: Don't directly refer to source files in Makefile for unit tests
Older versions of automake have trouble recursively cleaning such
constructs properly.
2014-06-19 14:00:49 +02:00