Commit Graph
1869 Commits
Author SHA1 Message Date
Martin Willi 918e92c4c9 Support multiple different public key strength types in constraints 2012-06-12 14:24:49 +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
Martin Willi 439d0742e9 Define auth_cfg rules for signature schemes 2012-06-12 14:24:49 +02:00
Tobias Brunner 753ca22f9c Implement strdupnull() macro as static inline function.
This avoids compiler warnings if the argument is a const char*.
2012-06-11 17:33:30 +02:00
Tobias Brunner cc55783f36 Added function to convert integrity algorithms to hash algorithms (if based on one). 2012-06-11 17:33:28 +02:00
Tobias Brunner 82e526ce81 Properly encode 0 in ASN.1.
According to X.690 an INTEGER object always has at least one content
octet.
2012-06-11 17:09:20 +02:00
Tobias Brunner e8120632ae Don't use chunk_skip() in asn1_length().
chunk_skip() returns chunk_empty if the length of the chunk is equal to
the number of bytes to skip, this is problematic as asn1_length() modifies
the original chunk.  asn1_parser_t for instance uses the modified chunk to
later calculate the length of the resulting ASN.1 object which produces
incorrect results if it is based on chunk_empty.
2012-06-11 17:09:20 +02:00
Tobias Brunner 6e6d78a561 Changed memory management and call logic in PKCS#7 parser/generator. 2012-06-11 17:09:20 +02:00
Tobias Brunner 2bf125f0ed Changed memory management and attribute handling in PKCS#9 wrapper. 2012-06-11 17:09:20 +02:00
Tobias Brunner ea92d4f305 Added get_attributes() method to pkcs7_t. 2012-06-11 17:09:19 +02:00
Tobias Brunner a69d8dd000 Log group added for applications other than daemons. 2012-06-11 17:09:19 +02:00
Tobias Brunner 07f0abd7ac Updated PKCS#7 parser/generator in libstrongswan.
Added some functionality from pluto's version, updated usage of asn1
and crypto primitives. It does compile but is not really tested yet.
2012-06-11 17:09:19 +02:00
Tobias Brunner 9e9295ed10 Properly handle empty RDN values in DN strings. 2012-06-07 16:50:11 +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 0e5d587df7 get_match() method added to hashtable_t. 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
Martin Willi 75d4e01c4a Enumerate correct list while removing nonce_gens, fix deregistration 2012-05-21 12:28:01 +02:00
Martin Willi 32400cd91a Added a convenience function to dump backtraces for gdb-less debugging 2012-05-21 12:18:49 +02:00
Tobias Brunner 22bf44c8b9 Use separate Doxygen groups for IKEv1 and IKEv2 entities (authenticators, tasks etc.). 2012-05-18 10:04:08 +02:00
Tobias Brunner 816f7f238f pkcs8: Initialize salt and IV properly. 2012-05-18 08:36:37 +02:00
Tobias Brunner b826b192ba Add enumerator for registered nonce generators. 2012-05-18 08:15:41 +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
Martin Willi 1b82fdb2e5 Use correct integrity_algorithm_t enum type in bench_signer() 2012-05-14 14:11:22 +02:00
Martin Willi d185b6acee Make function pointer defined with METHOD() macro non-const
clang complains about it being const, and the object code
generated from gcc is the same.
2012-05-14 14:10:00 +02:00
Martin Willi 2e1f4a4631 Remove unused return value of INIT(), making clang happy 2012-05-14 14:07:00 +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
Tobias Brunner 4d21000cf7 Added recursive read_lock support to our own implementation of rwlock_t. 2012-05-02 14:45:38 +02:00
Tobias Brunner 052e0a17b8 Use wrapped semaphore in callback_job_t. 2012-05-02 14:45:38 +02:00
Tobias Brunner 8f6c13271c Added a wrapper class around POSIX semaphores. 2012-05-02 14:45:37 +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 7e84c4275c Removed auth_cfg_t.replace_value() and replaced usages with add().
replace_value() was used to replace identities. Since for these the latest is
now returned by get(), adding the new identity with add() is sufficient.
2012-04-18 18:50:14 +02:00
Tobias Brunner ebc1ffe451 Changed the order and semantics of rules we expect only once in auth_cfg_t.
These rules are now inserted at the front of the internal list, this
allows to retrieve the rule added last with get(). For other rules the
order in which they are added is maintained (this allows to properly
enumerate them).
2012-04-18 18:50:14 +02:00
Tobias Brunner 68cca941cf Added a simple method to replace the value of a rule in auth_cfg_t. 2012-04-16 13:44:27 +02:00
Tobias Brunner bad192069f Make AES-CMAC actually usable for IKEv2. 2012-04-04 10:51:46 +02:00
Andreas Steffen 4670661d6d represent 0 as a single byte 2012-04-03 14:19:37 +02:00
Andreas Steffen 320fd5fe62 moved chunk_skip_zero to chunk.h 2012-04-03 14:12:50 +02:00