Commit Graph
13946 Commits
Author SHA1 Message Date
Martin Willi 607eebcfcf libipsec: Pass separate inbound/update flags to the IPsec SA manager
Similar to other kernel interfaces, the libipsec backends uses the flag for
different purposes, and therefore should get separate flags.
2015-03-09 18:18:20 +01:00
Martin Willi 942797a5b5 kernel-interface: Add a separate "update" flag to add_sa()
The current "inbound" flag is used for two purposes: To define the actual
direction of the SA, but also to determine the operation used for SA
installation. If an SPI has been allocated, an update operation is required
instead of an add.

While the inbound flag normally defines the kind of operation required, this
is not necessarily true in all cases. On the HA passive node, we install inbound
SAs without prior SPI allocation.
2015-03-09 18:18:20 +01:00
Martin Willi 68e5ada005 tkm: Use the inbound flag do determine peer role in CHILD_SA exchange
This was not available during initial implementation, but fits just fine to
avoid reconstructing the peer role.
2015-03-09 18:18:20 +01:00
Martin Willi acad5e9f51 Revert "child-sa: Remove the obsolete update logic"
While the the meaning of the "inbound" flag on the kernel_interface->add_sa()
call is not very clear, we still need that update logic to allow installation of
inbound SAs without SPI allocation. This is used in the HA plugin as a passive
node.

This reverts commit 698ed656.
2015-03-09 18:18:20 +01:00
Martin Willi 8be21ae7ef Revert "ha: Always install the CHILD_SAs with the inbound flag set to FALSE"
While this change results in the correct add/update flag during installation,
it exchanges all other values in the child_sa->install() call. We should pass
the correct flag, but determine the add/update flag by other means.

This reverts commit e722ee5d.
2015-03-09 18:18:20 +01:00
Tobias Brunner ab65a3e8fc tkm: Disable RFC 7427 signature authentication
TKM can't verify such signatures so we'd fail in the authorize hook.
Skipping the algorithm identifier doesn't help if the peer uses
anything other than SHA-1, so config changes would be required.
2015-03-09 16:59:07 +01:00
Tobias Brunner 708dff0700 ikev2: Move code in pubkey authenticator's build() method into separate functions 2015-03-09 16:59:07 +01:00
Tobias Brunner 03a340c6c6 ikev2: Try all eligible signature schemes
Previously, we failed without recovery if a private key did not support
a selected signature scheme (based on key strength and the other peer's
supported hash algorithms).
2015-03-09 16:59:07 +01:00
Tobias Brunner 1735d80f38 files: Add simple plugin to load files from file:// URIs 2015-03-09 16:08:52 +01:00
Tobias Brunner 69bb1b8c18 daemon: Remove scheduled jobs before unloading plugins
Especially callback jobs might refer to memory that gets invalid after
the plugins got unlaoded, so make sure we destroy these jobs before.

References #840.
2015-03-09 15:58:06 +01:00
Tobias Brunner 11ac1dff9c scheduler: Add method to remove all scheduled jobs
References #840.
2015-03-09 15:57:57 +01:00
Tobias Brunner 1bfa5e0cac plugin-loader: Increase log level for warning about plugin features that failed to load
Since we can't get rid of all unmet dependencies (at least not in every
possible plugin configuration) the message is more confusing than
helpful.  In particular because a detailed warning about plugin features
that failed to load due to unmet dependencies is only logged on level 2.
2015-03-09 15:45:29 +01:00
Tobias Brunner 18597950fa tls-peer: Make sure to use the right trusted public key for peer
In case a CA certificate uses the same subject DN as the server the
previous code could end up trying to verify the server's signature with
the CA certificate's public key.  By comparing the certificate with the
one sent by the peer we make sure to use the right one.

Fixes #849.
2015-03-09 15:40:06 +01:00
Tobias Brunner e5009fbb66 pkcs11: Convert RFC 3279 ECDSA signatures when verifying
References #873.
2015-03-09 15:37:07 +01:00
Tobias Brunner b258ed0192 pkcs11: Properly encode RFC 3279 ECDSA signatures
Fixes #873.
2015-03-09 15:37:07 +01:00
Tobias Brunner 8c9a0b5fb5 pkcs11: Properly encode EC_POINTs created on a token
Some tokens might not fail when creating EC public keys in the incorrect
format, but they will later not be able to use them to verify signatures.

References #872.
2015-03-09 15:37:01 +01:00
Tobias Brunner 4aab3153a4 pkcs11: Properly handle EC_POINTs returned as ASN.1 octet string
This is the correct encoding but we internally only use unwrapped keys
and some tokens return them unwrapped.

Fixes #872.
2015-03-09 15:36:07 +01:00
Andreas Steffen 8fa9312f09 Updated products in imv database 2015-03-08 17:18:34 +01:00
Andreas Steffen 20f90d7160 attest: output trusted flag and device description 2015-03-08 17:17:11 +01:00
Andreas Steffen 00cd79b678 Make access requestor IP address available to TNC server 2015-03-08 17:17:11 +01:00
Tobias Brunner 8b2af616ac testing: Update modified updown scripts to the latest template
This avoids confusion and makes identifying the changes needed for each
scenario easier.
2015-03-06 16:51:50 +01:00
Tobias Brunner 4e92441d0c Remove obsolete _updown_espmark script
According to NEWS it was created to support kernels < 2.6.16.
2015-03-06 16:51:50 +01:00
Tobias Brunner fd25fb3118 _updown: Remove obsolete stuff from default script 2015-03-06 16:51:50 +01:00
Tobias Brunner 9fda0bf007 ikev1: Set protocol ID and SPIs in INITIAL-CONTACT notification payloads
The payload we sent before is not compliant with RFC 2407 and thus some
peers might abort negotiation (e.g. with an INVALID-PROTOCOL-ID error).

Fixes #819.
2015-03-06 16:50:13 +01:00
Tobias Brunner 6133770db4 x509: Use subjectKeyIdentifier provided by issuer cert when checking CRL issuer
Some CAs don't use SHA-1 hashes of the public key as subjectKeyIdentifier and
authorityKeyIdentifier.  If that's the case we can't force the
calculation of the hash to compare that to authorityKeyIdentifier in the CRL,
instead we use the subjectKeyIdentifier stored in the issuer certificate, if
available.  Otherwise, we fall back to the SHA-1 hash (or comparing the
DNs) as before.
2015-03-06 16:49:12 +01:00
Tobias Brunner 96e6130537 kernel-pfkey: Add option to set receive buffer size of event socket
If many requests are sent to the kernel the events generated by these
requests may fill the receive buffer before the daemon is able to read
these messages.

Fixes #783.
2015-03-06 16:45:22 +01:00
Andreas Steffen 3fcb59b62a use SHA512 for moon's BLISS signature 2015-03-04 14:08:37 +01:00
Tobias Brunner 0a8268d0f1 Merge branch 'ikev2-signature-authentication'
This adds support for RFC 7427 signature authentication in IKEv2,
enabling the use of stronger signature schemes (e.g. RSA with SHA-2)
for IKE authentication.

Public key constraints defined in `rightauth` are now also checked
against IKEv2 signature schemes (may be disabled via strongswan.conf).

Fixes #863.
2015-03-04 13:56:50 +01:00
Tobias Brunner 3f1ef3a678 NEWS: Introduce RFC 7427 signature authentication 2015-03-04 13:54:12 +01:00
Tobias Brunner 276cf3b725 man: Add documentation about IKEv2 signature schemes 2015-03-04 13:54:12 +01:00
Tobias Brunner 26ebe5fea8 testing: Test classic public key authentication in ikev2/net2net-cert scenario 2015-03-04 13:54:12 +01:00
Tobias Brunner 53217d70b0 testing: Disable signature authentication on dave in openssl-ikev2/ecdsa-certs scenario 2015-03-04 13:54:12 +01:00
Tobias Brunner 4e6f102842 ikev2: Try all RSA signature schemes if none is configured 2015-03-04 13:54:12 +01:00
Tobias Brunner 1d94b7950b ikev2: Consider signature schemes in rightauth when sending hash algorithms 2015-03-04 13:54:12 +01:00
Tobias Brunner 1cbd34b9d4 tkm: Implement hash algorithm storage methods of keymat_v2_t interface 2015-03-04 13:54:11 +01:00
Tobias Brunner f9e0caab6d keymat: Use hash algorithm set 2015-03-04 13:54:11 +01:00
Tobias Brunner 1d384bf8aa hash-algorithm-set: Add class to manage a set of hash algorithms 2015-03-04 13:54:11 +01:00
Tobias Brunner b67ae0f89c ikev2: Add an option to disable constraints against signature schemes
If this is disabled the schemes configured in `rightauth` are only
checked against signature schemes used in the certificate chain and
signature schemes used during IKEv2 are ignored.

Disabling this could be helpful if existing connections with peers that
don't support RFC 7427 use signature schemes in `rightauth` to verify
certificate chains.
2015-03-04 13:54:11 +01:00
Tobias Brunner 31bccf4ba1 stroke: Enable BLISS-based public key constraints 2015-03-04 13:54:11 +01:00
Tobias Brunner 83dcb2d46d credential-manager: Store BLISS key strength in auth config 2015-03-04 13:54:11 +01:00
Tobias Brunner ddb09a0603 auth-cfg: Add BLISS key strength constraint 2015-03-04 13:54:11 +01:00
Tobias Brunner 7a9c0d51f4 testing: Don't check for exact IKEv2 fragment size
Because SHA-256 is now used for signatures the size of the two IKE_AUTH
messages changed.
2015-03-04 13:54:10 +01:00
Tobias Brunner 4aa24d4c13 testing: Update test conditions because signature schemes are now logged
RFC 7427 signature authentication is now used between strongSwan hosts
by default, which causes the actual signature schemes to get logged.
2015-03-04 13:54:10 +01:00
Tobias Brunner 2f1b2d9183 testing: Add ikev2/rw-sig-auth scenario 2015-03-04 13:54:10 +01:00
Tobias Brunner 3b31245a0f testing: Add ikev2/net2net-cert-sha2 scenario 2015-03-04 13:54:10 +01:00
Tobias Brunner cc048f0c50 ikev2: Fall back to SHA-1 signatures for RSA
This is really just a fallback to "classic" IKEv2 authentication if the other
peer supports no stronger hash algorithms.
2015-03-04 13:54:10 +01:00
Tobias Brunner 0bdc79b5f9 ikev2: Select a signature scheme appropriate for the given key
By enumerating hashes we'd use SHA-1 by default.  This way stronger
signature schemes are preferred.
2015-03-04 13:54:10 +01:00
Tobias Brunner 1f648d756b public-key: Add helper to determine acceptable signature schemes for keys 2015-03-04 13:54:10 +01:00
Tobias Brunner 0b14ce5802 ikev2: Log the actual signature scheme used for RFC 7427 authentication 2015-03-04 13:54:09 +01:00
Tobias Brunner a7bbe59f85 ikev2: Store signature scheme used to verify peer in auth_cfg
This enables late connection switching based on the signature scheme used
for IKEv2 and allows to enforce stronger signature schemes.

This may break existing connections with peers that don't support RFC 7427
if signature schemes are currently used in `rightauth` for certificate chain
validation and if the configured schemes are stronger than the default used
for IKE (e.g. SHA-1 for RSA).
2015-03-04 13:54:09 +01:00