Commit Graph

15480 Commits

Author SHA1 Message Date
Andreas Steffen 880c312458 Fixed in-place update of cached base and delta CRLs 2016-10-30 16:37:24 +01:00
Andreas Steffen 2271ebb325 Newer CRLs replace older versions of the CRL in the cache 2016-10-26 12:48:54 +02:00
Tim Kent 87875086d0 connmark: Add CAP_NET_RAW to capabilities keep list
Fix for "Permission denied (you must be root)" error when calling
iptc_init(), which opens a RAW socket to communicate with the kernel,
when built with "--with-capabilities=libcap".

Closes strongswan/strongswan#53.
Fixes #2157.
2016-10-25 09:46:23 +02:00
Andreas Steffen e6a4bd83ff Version bump to 5.5.1 2016-10-20 12:57:00 +02:00
Tobias Brunner 07bbd2f642 nm: Enable IKE fragmentation 2016-10-20 08:03:26 +02:00
Andreas Steffen 4d77fcbec9 Version bump to 5.5.1rc2 2016-10-18 18:14:57 +02:00
Andreas Steffen ba6c7a52c0 testing: Renewed expired certificates 2016-10-18 18:13:58 +02:00
Andreas Steffen cb8f436112 added XOF dependencies of bliss and ntru plugins 2016-10-18 16:28:43 +02:00
Andreas Steffen d167776ff9 testing: enable MACsec in guest kernel 2016-10-18 16:25:19 +02:00
Tobias Brunner ede17556ad configure: Reorder mgf1 in list of crypto plugins 2016-10-18 11:44:30 +02:00
Tobias Brunner 8564535c23 newhope: Fix Doxygen group name 2016-10-14 18:41:25 +02:00
Tobias Brunner ad71db18f1 libnttfft: Fix Doxygen group 2016-10-14 18:37:14 +02:00
Tobias Brunner 955ce91652 Fixed some typos, courtesy of codespell 2016-10-14 18:09:09 +02:00
Tobias Brunner d3beae1311 newhope: Properly release allocated arrays if RNG can't be created 2016-10-14 15:24:04 +02:00
Tobias Brunner b9c4b15a53 nm: Add D-Bus policy to the distribution 2016-10-14 14:11:23 +02:00
Tobias Brunner 542b464e25 nm: Version bump to 1.4.1 2016-10-14 09:52:11 +02:00
Christophe Gouault a63a7af197 kernel-netlink: Fix get_route() interface determination
A wrong variable is used (route instead of best), so much that the
returned interface belongs to the last seen route instead of the best
choice route.

get_route() may therefore return mismatching interface and gateway.

Fixes: 66e9165bc6 ("kernel-netlink: Return outbound interface in get_nexthop()")

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
2016-10-12 19:25:31 +02:00
Andreas Steffen a617223ed5 Version bump to 5.5.1rc1 2016-10-11 19:21:36 +02:00
Andreas Steffen 8a56405a82 Merge branch 'cache-crls' 2016-10-11 17:19:29 +02:00
Andreas Steffen 85b5a6ace2 Save both base and delta CRLs to disk 2016-10-11 17:18:22 +02:00
Andreas Steffen 2a2669ee3e vici: strongswan.conf cache_crls = yes saves fetched CRLs to disk 2016-10-11 17:18:22 +02:00
Tobias Brunner 9ba6548766 mem-cred: Support storing a delta CRL together with its base
So far every "newer" CRL (higher serial or by date) replaced an existing
"older" CRL.  This meant that delta CRLs replaced an existing base CRL
and that base CRLs weren't added if a delta CRL was already stored.  So
the base had to be re-fetched every time after a delta CRL was added.

With this change one delta CRL to the latest base may be stored.  A newer
delta CRL will replace an existing delta CRL (but not its base, older
base CRLs are removed, though).  And a newer base will replace the existing
base and optional delta CRL.
2016-10-11 17:18:22 +02:00
Tobias Brunner cee01fc9bf revocation: Cache valid CRL also if certificate is revoked 2016-10-11 17:18:22 +02:00
Tobias Brunner 790847d17c pki: Don't remove zero bytes in CRL serials anymore
This was added a few years ago because pki --signcrl once encoded serials
incorrectly as eight byte blobs.  But still ensure we have can handle
overflows in case the serial is encoded incorrectly without zero-prefix.
2016-10-11 17:18:22 +02:00
Tobias Brunner 49d9266c31 pki: Use serial of base CRL for delta CRLs
According to RFC 5280 delta CRLs and complete CRLs MUST share one
numbering sequence.
2016-10-11 17:18:22 +02:00
Tobias Brunner c72c6e9225 openssl: Fix AES-GCM with BoringSSL
BoringSSL only supports a limited list of (hard-coded) algorithms via
EVP_get_cipherbyname(), which does not include AES-GCM.  While BoringSSL
deprecated these functions they are also supported by OpenSSL (in BoringSSL
a completely new interface for AEADs was added, which OpenSSL currently does
not support).
2016-10-11 15:29:14 +02:00
Tobias Brunner 8b35d5f162 android: Identifiers for SHA2-base RSA signature schemes got renamed
Fixes: 40f2589abf ("gmp: Support of SHA-3 RSA signatures")
2016-10-11 15:29:14 +02:00
Tobias Brunner befe6e6c7e android: MGF1 implementation was moved to a plugin
Fixes: 188b190a70 ("mgf1: Refactored MGF1 as an XOF")
2016-10-11 15:29:14 +02:00
Yannick CANN 5f97b73554 ldap: Fix crash in case of empty LDAP response for CRL fetch
In case of an empty LDAP result during a CRL fetch (for example, due to
a wrong filter attribute in the LDAP URI, or invalid LDAP configuration),
the call to ldap_result2error() with NULL value for "entry" lead to
a crash.

Closes strongswan/strongswan#52.
2016-10-06 18:08:51 +02:00
Tobias Brunner bd815325a6 libimcv: Add Debian 8.6 to database 2016-10-05 16:01:20 +02:00
Tobias Brunner 0ddda7ca56 task-manager: Only trigger retransmit cleared alert if there was at least one retransmit
The counter is already increased when sending the original message.

Fixes: bd71ba0ffb ("task-manager: Add retransmit cleared alert")
2016-10-05 16:01:14 +02:00
Tobias Brunner 26df5e9aa4 Merge branch 'proposal-checks'
Adds checks for proposals parsed from strings.  For instance, the presence
of DH, PRF and encryption algorithms for IKE are now enforced and AEAD and
regular encryption algorithms are not allowed in the same proposal anymore.
Also fixed is the mapping of the aes*gmac keywords to an integrity algorithm
in AH proposals.
2016-10-05 14:59:31 +02:00
Tobias Brunner 89054d9dcb unit-tests: Enable optional logging in libcharon unit tests 2016-10-05 14:27:05 +02:00
Tobias Brunner 9e5065d877 unit-tests: Add more tests for proposal creation 2016-10-05 14:27:05 +02:00
Tobias Brunner a65a282fd1 proposal: Correctly add AES-GMAC for AH proposals
We parse aes*gmac as encryption algorithm, which we have to map to an
integrity algorithm.  We also make sure we remove all other encryption
algorithms and ensure there is an integrity algorithm.
2016-10-05 14:27:05 +02:00
Tobias Brunner 6a5e6579ea proposal: Enforce separate proposals for AEAD and classic encryption algorithms 2016-10-05 14:27:04 +02:00
Tobias Brunner e98414ea9c proposal: Make sure there is a PRF defined in IKE proposals
But filter PRFs from ESP proposals.
2016-10-05 14:27:04 +02:00
Tobias Brunner 9b191d5975 proposal: Make DH groups mandatory in IKE proposals parsed from strings
References #2051.
2016-10-05 14:26:55 +02:00
Tobias Brunner fcca7d2904 ikev2: Respond with NO_PROPOSAL_CHOSEN if proposal without DH group was selected
Fixes #2051.
2016-10-05 14:26:50 +02:00
Tobias Brunner 597e057b9e testing: Remove ikev2/default-keys scenario
No default keys are generated anymore.
2016-10-05 12:25:29 +02:00
Tobias Brunner bfc595a36a kernel-netlink: Consider RTA_SRC when looking for a source address 2016-10-05 11:44:53 +02:00
Tobias Brunner 1bfa3f2a10 Merge branch 'priv-key-any'
Adds the ability to parse KEY_ANY keys via the pkcs1 and openssl plugins.
This is then used in the pki utility, where private keys may now be
loaded via `priv` keyword instead of having to specify the type of the key
explicitly.  And swanctl can load any type of key from the swanctl/private
directory.
2016-10-05 11:36:11 +02:00
Tobias Brunner 7caba2eb55 swanctl: Add 'private' directory/section to load any type of private key 2016-10-05 11:33:36 +02:00
Tobias Brunner 05ccde0a8b pki: Add generic 'priv' key type that loads any type of private key 2016-10-05 11:32:52 +02:00
Tobias Brunner 4a6f97d00b openssl: Add a generic private key loader 2016-10-05 11:32:52 +02:00
Tobias Brunner 437610ace5 pkcs1: Support building of KEY_ANY private keys
We try to detect the type of key by parsing the basic structure of the
passed ASN.1 blob.
2016-10-05 11:32:52 +02:00
Tobias Brunner 1798e490da pki: Drop -priv suffix to specify private key types 2016-10-05 11:32:52 +02:00
Tobias Brunner 33241871a8 ikev2: Only add NAT-D notifies to DPDs as initiator
If a responder is natted it will usually be a static NAT (unless it's a
mediated connection) in which case adding these notifies makes not much
sense (if the initiator's NAT mapping had changed the responder wouldn't
be able to reach it anyway).  It's also problematic as some clients refuse
to respond to DPDs if they contain such notifies.

Fixes #2126.
2016-10-04 12:16:05 +02:00
Raphael Geissert 9a7049635e pkcs11: Look for the CKA_ID of the cert if it doesn't match the subjectKeyId
charon-nm fails to find the private key when its CKA_ID doesn't match the
subjectKeyIdentifier of the X.509 certificate.  In such cases, the private
key builder now falls back to enumerating all the certificates, looking for
one that matches the supplied subjectKeyIdentifier.  It then uses the CKA_ID
of that certificate to find the corresponding private key.

It effectively means that PKCS#11 tokens where the only identifier to relate
the certificate, the public key, and the private key is the CKA_ID are now
supported by charon-nm.

Fixes #490.
2016-10-04 12:09:04 +02:00
Tobias Brunner 97c74b565b nm: Make global CA directory configurable 2016-10-04 10:27:35 +02:00