Commit Graph
832 Commits
Author SHA1 Message Date
Tobias Brunner 738b9121cb Use mac_t and PRF and signer wrappers in cmac plugin 2012-06-25 16:35:06 +02:00
Tobias Brunner 83cb52b044 Use mac_t and PRF and signer wrappers in xcbc plugin 2012-06-25 16:35:06 +02:00
Tobias Brunner c4a3c9672a Make the hmac_t interface a generic interface for message authentication codes 2012-06-25 16:35:06 +02:00
Tobias Brunner 228d096e42 Simplified creation of PRFs and signers in openssl and hmac plugins 2012-06-25 16:35:06 +02:00
Tobias Brunner 73d032e412 Use simple wrappers for HMAC based PRF and signer in openssl plugin 2012-06-25 16:35:06 +02:00
Tobias Brunner 63420c6e13 Use simple wrappers for HMAC based PRF and signer in hmac plugin 2012-06-25 16:35:06 +02:00
Tobias Brunner 8391c1d0b1 Refactored OpenSSL based HMAC implementation 2012-06-25 16:35:06 +02:00
Aleksandr Grinberg 54081897cf Adding OpenSSL HMAC signer functions to openssl plugin 2012-06-25 16:35:05 +02:00
Aleksandr Grinberg 0504b0a09f Adding OpenSSL HMAC pseudo random functions to openssl plugin 2012-06-25 16:35:05 +02:00
Aleksandr Grinberg 4faece7b1e Adding OpenSSL random number functions to openssl plugin 2012-06-25 16:35:05 +02:00
Martin Willi fd4ff11858 Add signature schemes to auth_cfg during trustchain validation 2012-06-12 14:24:49 +02:00
Martin Willi a37f2d2006 certificate_t->issued_by takes an argument to receive signature scheme 2012-06-12 14:24:49 +02:00
Tobias Brunner 79d5c4f06b Fixed return values of several functions (e.g. return FALSE for pointer types). 2012-05-31 17:39:04 +02:00
Martin Willi 060b508e0e Fix boolean return value if an empty RSA signature is detected in gmp plugin
Fixes CVE-2012-2388.
2012-05-31 17:38:59 +02:00
Tobias Brunner fda9f104b4 Fixed check for loaded plugins with feature types that are not compared exactly.
Previously e.g. RNGs with weaker strength would have overwritten stronger
ones.
2012-05-24 15:15:34 +02:00
Tobias Brunner 9eac6106d0 Use a hashtable to check for already loaded plugin features. 2012-05-23 17:50:05 +02:00
Tobias Brunner a9cfd29c10 Hash function for plugin features added. 2012-05-23 17:50:05 +02:00
Tobias Brunner 816f7f238f pkcs8: Initialize salt and IV properly. 2012-05-18 08:36:37 +02:00
Adrian-Ken Rueegsegger 04024b5de8 Add nonce plugin implementation
This nonce generator uses an RNG to generate nonces. The RNG quality is
currently set to RNG_WEAK which is the same value used in IKE init.

The plugin is enabled and thus built by default.
2012-05-18 08:15:40 +02:00
Adrian-Ken Rueegsegger e2fc09c186 Add nonce generator interface
Nonce generators (nonce_gen_t) can be used to get or allocate nonces.

Users can request nonce generators from the crypto factory while nonce
plugins register/remove themselves to/from the crypto factory.
2012-05-18 08:15:40 +02:00
Andreas Steffen 1e26235a0d fixed feature dependencies for CERT_TRUSTED_PUBKEY 2012-05-05 08:54:36 +02:00
Martin Willi 40ca363a8b If we load new features from a plugin, restart loading from first plugin 2012-05-03 11:08:09 +02:00
Martin Willi 7f957b3379 Building CERT_ANY through PEM requires either a CERT_X509 or a CERT_PGP builder 2012-05-03 09:40:25 +02:00
Martin Willi 0c7af2ce27 Certificate decoding soft-depends on public key decoding of specific types 2012-05-02 14:05:52 +02:00
Martin Willi 4b5e637472 PEM loading plugin features depend on the same feature, they are helpers only 2012-05-02 14:05:52 +02:00
Martin Willi f14bf6345f Don't depend on a feature that has a dependency to the same feauture during unload 2012-05-02 14:05:52 +02:00
Martin Willi b24be29646 Merge branch 'ikev1'
Conflicts:
	configure.in
	man/ipsec.conf.5.in
	src/libcharon/encoding/generator.c
	src/libcharon/encoding/payloads/notify_payload.c
	src/libcharon/encoding/payloads/notify_payload.h
	src/libcharon/encoding/payloads/payload.c
	src/libcharon/network/receiver.c
	src/libcharon/sa/authenticator.c
	src/libcharon/sa/authenticator.h
	src/libcharon/sa/ikev2/tasks/ike_init.c
	src/libcharon/sa/task_manager.c
	src/libstrongswan/credentials/auth_cfg.c
2012-05-02 11:12:31 +02:00
Andreas Steffen 6704d69f91 added missing whitespace 2012-04-30 11:42:09 +02:00
Tobias Brunner 88206458ce Properly initialize optional subject in PEM builder. 2012-04-30 10:48:57 +02:00
Andreas Steffen 5f1931ada1 added support for raw RSA public keys to stroke 2012-04-30 00:31:42 +02:00
Andreas Steffen d2976167af CERT_TRUSTED_PUBKEY stores notBefore, notAfter and subject information 2012-04-25 20:53:08 +02:00
Tobias Brunner 811e7490f6 Added test vectors for AES-CMAC. 2012-04-03 10:45:09 +02:00
Tobias Brunner c0d39c205c Implemented AES-CMAC based PRF and signer.
The cmac plugin implements AES-CMAC as defined in RFC 4493 and the
signer and PRF based on it as defined in RFC 4494 and RFC 4615,
respectively.
2012-04-03 10:40:47 +02:00
Tobias Brunner 9a6b1cb412 Fixed GNU license header in hmac and xcbc plugins. 2012-04-03 10:33:59 +02:00
Tobias Brunner 817ab8a8d4 Don't cast second argument of mem_printf_hook (%b) to size_t.
Also treat the given number as unsigned int.

Due to the printf hook registration the second argument of
mem_printf_hook (if called via printf etc.) is always of type int*.
Casting this to a size_t pointer and then dereferencing that as int does
not work on big endian machines if int is smaller than size_t (e.g. on ppc64).

In order to make this change work if the argument is of a type larger
than int, size_t for instance, the second argument for %b has to be casted
to (u_)int.
2012-03-27 09:10:34 +02:00
Martin Willi b1f2f05c92 Merge branch 'ikev1-clean' into ikev1-master
Conflicts:
	configure.in
	man/ipsec.conf.5.in
	src/libcharon/daemon.c
	src/libcharon/plugins/eap_ttls/eap_ttls_peer.c
	src/libcharon/plugins/eap_radius/eap_radius_accounting.c
	src/libcharon/plugins/eap_radius/eap_radius_forward.c
	src/libcharon/plugins/farp/farp_listener.c
	src/libcharon/sa/ike_sa.c
	src/libcharon/sa/keymat.c
	src/libcharon/sa/task_manager.c
	src/libcharon/sa/trap_manager.c
	src/libstrongswan/plugins/x509/x509_cert.c
	src/libstrongswan/utils.h

Applied lost changes of moved files keymat.c and task_manager.c.
Updated listener_t.message hook signature in new plugins.
2012-03-20 17:57:53 +01:00
Martin Willi 35852af7b1 Use a single set of FDs for all random plugin RNG instances 2012-03-20 17:31:40 +01:00
Martin Willi 747f837cce Added a flag to register local credential sets exclusively, disabling all others 2012-03-20 17:31:28 +01:00
Martin Willi 5d1677f52d Added missing XAuth plugin feature enum names 2012-03-20 17:31:28 +01:00
Martin Willi 26a758ffcb Fixed fix for XAuth plugin feature matching 2012-03-20 17:31:25 +01:00
Martin Willi 2ee83c2778 Fix XAuth plugin feature matching 2012-03-20 17:31:25 +01:00
Tobias Brunner f29a4f1c64 Added support for iKEIntermediate X.509 extended key usage flag.
Mac OS X requires server certificates to have this flag set.
2012-03-20 17:31:24 +01:00
Tobias Brunner 00cc2188d4 Some whitespace fixes. 2012-03-20 17:31:24 +01:00
Martin Willi f223a28ae7 Be less verbose if plugin dependecy not satisfied 2012-03-20 17:31:16 +01:00
Martin Willi 6ebcbc654c Added auth_cfg option to select XAUTH backend to use 2012-03-20 17:31:15 +01:00
Martin Willi 1fe6cdfac2 Use a string to identify xauth backends, no need for integer types 2012-03-20 17:31:15 +01:00
Clavister OpenSource 9c5366446a IKEv1 XAuth: Added plugin support for XAuth, which allows us to have plugins to talk to servers with different quirks for XAuth authentication. 2012-03-20 17:31:11 +01:00
Tobias Brunner a190ec0ac5 Compiler warnings fixed. 2012-02-14 16:09:44 +01:00
Tobias Brunner fd1ff46f61 Added support for PKCS#5 v2 schemes when decrypting PKCS#8 files. 2012-02-01 18:27:46 +01:00
Tobias Brunner cab127cba6 Added support for encrypted PKCS#8 files (for some PKCS#5 v1.5 schemes). 2012-02-01 18:27:46 +01:00