Tobias Brunner
5d2fccf439
pkcs11: Search for private keys in a more generic way.
...
Also, don't extract the public key directly from the private key. Some
tokens actually do not return the public exponent (it's not required).
We have to find a different way to get the public key.
2011-11-02 20:27:55 +01:00
Tobias Brunner
9e3b1e1495
pkcs11: Added support to encode ECDSA public keys.
2011-11-02 20:27:55 +01:00
Tobias Brunner
36d1627f6e
pkcs11: Parse ECDSA public keys and find/create them on tokens.
2011-11-02 20:27:55 +01:00
Tobias Brunner
574261163f
pkcs11: Added generic functions to find/create public keys on tokens.
2011-11-02 20:27:55 +01:00
Tobias Brunner
a8084ee011
pkcs11: Store public key length in bits.
2011-11-02 20:27:55 +01:00
Tobias Brunner
8859c1f26b
pkcs11: Fix encoding of RSA public keys.
2011-11-02 20:27:55 +01:00
Tobias Brunner
dae19d448d
pkcs11: Use create_object_attr_enumerator to encode RSA public key.
2011-11-02 20:27:54 +01:00
Tobias Brunner
b0319fe860
pkcs11: Instead of a mutex use a new session to do multipart operations.
2011-11-02 20:27:54 +01:00
Tobias Brunner
c198525104
pkcs11: Function added to retrieve multiple attributes from a single object.
2011-11-02 20:27:54 +01:00
Tobias Brunner
817d165cbc
pkcs11: Memory leak fixed in DH/ECDH implementation.
2011-11-02 20:27:54 +01:00
Tobias Brunner
43cd036a77
pkcs11: Invalid free fixed in DH/ECDH implementation.
2011-11-02 20:27:54 +01:00
Tobias Brunner
50ad6eacb6
pkcs11: Changed how pkcs11-manager is initialized.
...
The manager is now created directly, but events and certificate loading
is deferred.
2011-11-02 20:27:54 +01:00
Tobias Brunner
cf9d45ea08
pkcs11: Add attributes to specify what we use the DH/ECDH keys for.
2011-11-02 20:27:54 +01:00
Tobias Brunner
b7b5bca048
pkcs11: Allow to build pkcs11 plugin on Android.
2011-10-31 18:55:27 +01:00
Tobias Brunner
1a9e3e0147
pkcs11: Documented new options in strongswan.conf(5).
2011-10-31 18:50:10 +01:00
Tobias Brunner
b3b3613c60
pkcs11: Register the pkcs11 plugin before any other crypto plugins.
...
This is what most users probably expect when they enable the pkcs11
plugin. All advanced features (like DH/RNG) are disabled by default.
2011-10-31 18:46:16 +01:00
Tobias Brunner
23b50b776b
pkcs11: Use callback registration for pkcs11-manager.
...
Otherwise a plugin providing X509 decoding capabilities might be unloaded
before the manager which will result in a segmentation fault when
certificates in the manager's credential sets are to be destroyed.
2011-10-31 18:45:37 +01:00
Tobias Brunner
10b82be61f
pkcs11: Merged the ECDH into the DH implementation.
2011-10-31 18:45:37 +01:00
Tobias Brunner
89de89be57
pkcs11: Use get_ck_attribute for ECDH.
2011-10-31 18:45:37 +01:00
Tobias Brunner
cac6853180
pkcs11: Use get_ck_attribute for DH.
2011-10-31 18:45:37 +01:00
Tobias Brunner
8531106578
pkcs11: Method added to library to extract a single attribute from an object.
2011-10-31 18:45:36 +01:00
Tobias Brunner
6a5020fc67
pkcs11: Added names for CKA_* constants.
2011-10-31 18:45:36 +01:00
Tobias Brunner
4e346b1f97
pkcs11: Added support for ECDH.
2011-10-31 18:45:36 +01:00
Tobias Brunner
612e431305
pkcs11: Added definitions needed for ECDH to pkcs11.h.
2011-10-31 18:45:36 +01:00
Tobias Brunner
7c78a6e631
pkcs11: Specify object class and key type when deriving DH secrets.
...
pkcs11_softtoken on OpenSolaris requires this (probably others too).
2011-10-31 18:45:36 +01:00
Tobias Brunner
b730fd6fbd
pkcs11: Add features support.
2011-10-31 18:45:36 +01:00
Tobias Brunner
1bb5d7c3cb
pkcs11: Added support for DH.
2011-10-31 18:45:36 +01:00
Tobias Brunner
df241121fd
pkcs11: Error message fixed.
2011-10-31 18:45:35 +01:00
Tobias Brunner
1bb522bc34
pkcs11: Added support to generate random numbers on a token.
2011-10-31 18:45:35 +01:00
Tobias Brunner
deba3da5b0
pkcs11: Properly destroy mutex in pkcs11_hasher if no token found.
2011-10-31 18:45:29 +01:00
Tobias Brunner
abb89a97d1
Some Doxygen fixes.
2011-10-28 21:24:52 +02:00
Tobias Brunner
075c706073
Copyright fixed.
2011-10-28 21:07:35 +02:00
Tobias Brunner
54ce738920
pluto: Compile warning fixed.
2011-10-27 15:42:44 +02:00
Tobias Brunner
3b8ed73708
pluto: plugin_list.* added to Android.mk.
2011-10-27 15:42:10 +02:00
Tobias Brunner
07bf080e6d
Added missing backslash.
2011-10-27 15:41:30 +02:00
Tobias Brunner
4683630442
Forgot to add Android.mk in ba5b559b41.
2011-10-26 18:31:34 +02:00
Tobias Brunner
8fde0b669b
Destroy objects hashtable after plugin_manager.
...
If plugins are not explicitly unloaded before library_deinit is called
there could have been a segfault because some plugins might unregister
objects during unloading/destruction.
2011-10-26 17:39:12 +02:00
Tobias Brunner
87c65e76fc
Don't link to tnc libraries on Android as no tnc plugins are currently enabled.
2011-10-25 11:57:00 +02:00
Tobias Brunner
ba5b559b41
Build libtnccs on Android.
2011-10-25 11:56:26 +02:00
Tobias Brunner
5d549cd4e1
Log if charon failed to establish a CHILD_SA but keeps the IKE_SA up.
2011-10-21 18:09:02 +02:00
Tobias Brunner
848a36fed7
starter.load documented in strongswan.conf(5) man page.
2011-10-21 17:30:39 +02:00
Tobias Brunner
bb3357e886
starter: Android.mk updated to use kernel-netlink via libhydra.
2011-10-21 14:24:34 +02:00
Tobias Brunner
adab84533e
starter: Use kernel interfaces to flush SAD and SPD.
...
This now supports platforms where neither 'ip xfrm' nor 'setkey' are
available (like Android).
2011-10-21 14:24:34 +02:00
Tobias Brunner
f3a682c1ff
starter: Load plugins specific to starter.
2011-10-21 14:24:34 +02:00
Tobias Brunner
d19eaf7457
starter: INFO_FILE is not used anymore.
2011-10-21 14:24:34 +02:00
Tobias Brunner
677955e9d4
The load-tester plugin does not support SAD/SPD flushing.
2011-10-21 14:24:33 +02:00
Tobias Brunner
0e6aafb5b6
The kernel-klips plugin does currently not support SAD/SPD flushing.
2011-10-21 14:24:33 +02:00
Tobias Brunner
773572f9e0
Implemented flushing of SAD and SPD entries via PF_KEY.
2011-10-21 14:24:33 +02:00
Tobias Brunner
99d23ddf45
Implemented flushing of states and policies via XFRM.
2011-10-21 14:18:53 +02:00
Tobias Brunner
0b0f466bbc
Defined functions in the kernel interface to flush SAD and SPD entries.
2011-10-21 14:18:23 +02:00
Tobias Brunner
bf3c2dde68
Fixed indention in load-tester kernel interface.
2011-10-21 14:18:14 +02:00
Tobias Brunner
039a976745
Log messages with a loglevel > 1 to ANDROID_LOG_DEBUG.
2011-10-18 15:05:51 +02:00
Tobias Brunner
21cb6cffb1
pluto: Log to logcat on Android.
2011-10-18 15:03:19 +02:00
Tobias Brunner
a8256f0bda
pluto: CAP_NET_RAW seems to be required on Android even to open regular sockets.
2011-10-18 11:52:43 +02:00
Tobias Brunner
bdbbab35b1
pluto: Switch to user 'vpn' on Android.
2011-10-18 11:36:52 +02:00
Tobias Brunner
b9307badfe
pluto: Removed last usage of KERNEL26_SUPPORT (and some KLIPS stuff).
...
Because linux is not defined on Android this caused trouble.
2011-10-18 10:30:26 +02:00
Tobias Brunner
778ef77d61
Avoid heaps of compiler warnings due to plugin features registration.
2011-10-17 13:51:48 +02:00
Tobias Brunner
7bc24c598f
Add features support to gcrypt plugin.
2011-10-17 13:51:48 +02:00
Tobias Brunner
89294d8731
pluto: Missing flushline call added when reading ipsec.secrets.
2011-10-14 18:38:18 +02:00
Tobias Brunner
1c10577648
starter: Only try to start pluto on Android if it is actually enabled.
2011-10-14 17:36:21 +02:00
Tobias Brunner
e45fb76b60
pluto: Fixed usage of prctl.
2011-10-14 17:36:20 +02:00
Tobias Brunner
926ed7d647
pluto: Fixed include for control socket.
2011-10-14 17:36:20 +02:00
Tobias Brunner
345e5330b5
pluto: Added fallback to ipsec.secrets parser if glob(3) is not available.
2011-10-14 17:36:20 +02:00
Tobias Brunner
5108d9507d
pluto: Include fixed.
2011-10-14 17:36:20 +02:00
Tobias Brunner
d52c37790e
pluto: Option added to disable adns.
...
This basically disables opportunistic encryption.
2011-10-14 17:36:20 +02:00
Tobias Brunner
2b9c3642e4
pluto: lwdnsq is not supported.
2011-10-14 17:36:20 +02:00
Tobias Brunner
cfa15a71d9
Source files in Android.mk updated.
2011-10-14 17:36:20 +02:00
Tobias Brunner
c293c87761
Don't use union members directly in plugin_feature_t.
2011-10-14 10:05:47 +02:00
Tobias Brunner
ef80de6010
Unload plugins which we were not able to load any features from.
2011-10-14 10:05:46 +02:00
Tobias Brunner
40e856fada
Fixed comment of create_plugin_enumerator.
2011-10-14 10:05:46 +02:00
Tobias Brunner
076aa51fc9
Easier to understand test for soft dependencies in dependencies_satisfied.
2011-10-14 10:05:46 +02:00
Tobias Brunner
1cde0a5127
Make build of pluto and starter optional on Android.
2011-10-13 19:25:57 +02:00
Tobias Brunner
0ad58f013a
Enable socket-raw on Android if pluto is enabled.
2011-10-13 19:25:06 +02:00
Tobias Brunner
03ef4e3461
Android does not support 'struct in6_pktinfo'.
2011-10-13 19:23:10 +02:00
Tobias Brunner
c27c9529b7
Enable XAUTH plugin on Android.
2011-10-13 18:39:01 +02:00
Tobias Brunner
9227a3b3fa
Use separate plugin lists for pluto and charon on Android.
2011-10-13 18:34:43 +02:00
Tobias Brunner
504c524c13
Added Android.mk for whack.
2011-10-13 18:33:03 +02:00
Tobias Brunner
4490804f13
Build pluto on Android.
...
Does not fully compile.
2011-10-13 18:29:36 +02:00
Tobias Brunner
d205046af3
util.h is a system header in Android < 2.x.
2011-10-13 18:24:00 +02:00
Tobias Brunner
68fcf91778
Unused variable removed.
2011-10-13 14:34:34 +02:00
Tobias Brunner
4a4cf41b9a
Make sure /proc/$$/fd exists.
...
This avoids the error message generated by enumerator_create_directory().
2011-10-13 11:22:40 +02:00
Tobias Brunner
5051bd23eb
Only close open file descriptors on Linux.
2011-10-13 11:21:57 +02:00
Tobias Brunner
652ddf5ce2
starter: Close open file descriptors after forking.
...
This avoids problems with Android's adb which leaves several file
descriptors open when executing processes.
2011-10-13 11:19:17 +02:00
Tobias Brunner
9a8fdc159a
Added a replacement for closefrom (available on *BSD).
2011-10-13 11:19:12 +02:00
Tobias Brunner
aa82ae3aa4
starter: Only create self-signed certificate if scepclient is built.
2011-10-12 16:37:21 +02:00
Tobias Brunner
e9f23d6264
Build ipsec on Android.
...
Note: this does not fully work as [ (or even test) is not supported on
Android by default.
2011-10-11 16:30:21 +02:00
Tobias Brunner
59ae6fd6f2
ipsec: Allow the shell in the shebang to be changed.
2011-10-11 16:30:20 +02:00
Tobias Brunner
b66a3b3d28
Build starter on Android.
2011-10-11 16:30:20 +02:00
Tobias Brunner
b3b1419e06
Build stroke on Android.
2011-10-11 16:30:20 +02:00
Tobias Brunner
dcd9970de6
Build libfreeswan on Android.
2011-10-11 16:30:20 +02:00
Tobias Brunner
635724f6ab
Enable the stroke plugin on Android.
2011-10-11 16:30:20 +02:00
Tobias Brunner
2421ac9e98
getpass(3) is not supported on Android.
...
No replacement yet.
2011-10-11 16:30:20 +02:00
Tobias Brunner
eae49aff88
Added some variables to the top Android.mk.
2011-10-11 16:30:20 +02:00
Tobias Brunner
ddce93206e
Fixed initialization of android plugin.
2011-10-11 16:30:20 +02:00
Tobias Brunner
f7ce74983d
Removed unneeded include.
...
This is not available on Android and redirects to <fcntl.h> on Ubuntu.
2011-10-11 16:30:20 +02:00
Tobias Brunner
d3bd67239f
Added fallback to ipsec.secrets parser if glob(3) is not available.
2011-10-11 16:30:20 +02:00
Tobias Brunner
187a5faf64
starter: Updated gitignores after LEX/YACC change.
2011-10-10 20:07:37 +02:00
Tobias Brunner
6f4eaa41a7
starter: Use automake LEX/YACC automatisms.
2011-10-10 19:31:04 +02:00
Tobias Brunner
e01fed7eb3
starter: fallback include handling without glob(3).
2011-10-10 18:05:44 +02:00
Tobias Brunner
d46f857511
Fixed unintentional fall-through in task_manager.
...
Reported by Howard Windsor.
2011-10-06 13:55:50 +02:00