Commit Graph
12518 Commits
Author SHA1 Message Date
Andreas Steffen 05eb83e986 Slightly edited evaltest of ikev2/ocsp-untrusted-cert scenario 2014-03-31 22:22:58 +02:00
Tobias Brunner 036dab0a10 unit-tests: Always load address of testable functions
The addresses can actually change as plugins are loaded/unloaded for
each test case.

Fixes #551.
2014-03-31 17:00:22 +02:00
Tobias Brunner 2a38b4556e settings: Reduce log verbosity if strongswan.conf does not exist
In some situations we expect strongswan.conf to not exist, for instance,
when running the unit tests before installation.
2014-03-31 16:40:04 +02:00
Tobias Brunner a800253fbf test-vectors: Renumber AES-GCM test vectors according to original source
Also adds several missing ones.
2014-03-31 16:38:30 +02:00
Martin Willi e2e0165605 Merge branch 'tls-aead'
Adds AEAD support to the TLS stack, currently supporting AES-GCM. Brings fixes
for TLS record fragmentation, enforcing TLS versions < 1.2 and proper signature
scheme support indication.
2014-03-31 16:17:57 +02:00
Martin Willi 7dc7fdea72 NEWS: Note TLS AEAD mode 2014-03-31 16:17:15 +02:00
Martin Willi e67e8dd197 tls: Fix some TLS cipher suite enum names
It is important to have them mapped correctly, as we use these official TLS
identifiers to configure specific TLS suites.
2014-03-31 16:07:53 +02:00
Martin Willi b37080f8c9 tls: Include TLS version announced in Client Hello in encrypted premaster
While a hardcoded 1.2 version is fine when we offer that in Client Hello, we
should include the actually offered version if it has been reduced before
starting the exchange.
2014-03-31 16:07:53 +02:00
Martin Willi f93497507f tls: Check for minimal TLS record length before each record iteration
Fixes fragment reassembling if a buffer contains more than one record, but
the last record contains a partial TLS record header. Thanks to Nick Saunders
and Jamil Nimeh for identifying this issue and providing a fix for it.
2014-03-31 15:56:12 +02:00
Martin Willi b886dad498 tls: Fix AEAD algorithm filtering, avoid filtering all suites if no AEAD found 2014-03-31 15:56:12 +02:00
Martin Willi 48d6b57c30 tls: Offer TLS signature schemes in ClientHello in order of preference
Additionally, we now query plugin features to find out what schemes we exactly
support.
2014-03-31 15:56:12 +02:00
Martin Willi d06890d6e2 tls: Define AES-GCM cipher suites from RFC 5288/5289 2014-03-31 15:56:12 +02:00
Martin Willi f0f301170b tls: Implement the TLS AEAD abstraction for real AEAD modes 2014-03-31 15:56:12 +02:00
Martin Willi d3204677ba tls: Separate TLS protection to abstracted AEAD modes
To better separate the code path for different TLS versions and modes of
operation, we introduce a TLS AEAD abstraction. We provide three implementations
using traditional transforms, and get prepared for TLS AEAD modes.
2014-03-31 15:56:12 +02:00
Martin Willi e5d73b0dfa aead: Support custom AEAD salt sizes
The salt, or often called implicit nonce, varies between AEAD algorithms and
their use in protocols. For IKE and ESP, GCM uses 4 bytes, while CCM uses
3 bytes. With TLS, however, AEAD mode uses 4 bytes for both GCM and CCM.

Our GCM backends currently support 4 bytes and CCM 3 bytes only. This is fine
until we go for CCM mode support in TLS, which requires 4 byte nonces.
2014-03-31 15:56:12 +02:00
Martin Willi e12eec1008 ikev2: Recreate a CHILD_SA that got a hard lifetime expire without rekeying
Works around issues related to system time changes and kernel backends using
that system time, such as Linux XFRM.
2014-03-31 15:08:22 +02:00
Martin Willi 94fb33bb88 revocation: Log error if no OCSP signer candidate found
Fixes evaluation of ikev2/ocsp-untrusted-cert.
2014-03-31 15:02:17 +02:00
Martin Willi 11614d783b Merge branch 'ocsp-constraints'
Limits cached OCSP verification to responses signed by the CA, a directly
delegated signer or a pre-installed OCSP responder certificate. Disables
auth config merge for revocation trust-chain strength checkin, as it breaks
CA constraints in some scenarios.
2014-03-31 14:44:50 +02:00
Martin Willi 91d71abb16 revocation: Restrict OCSP signing to specific certificates
To avoid considering each cached OCSP response and evaluating its trustchain,
we limit the certificates considered for OCSP signing to:

- The issuing CA of the checked certificate
- A directly delegated signer by the same CA, having the OCSP signer constraint
- Any locally installed (trusted) certificate having the OCSP signer constraint

The first two options cover the requirements from RFC 6960 2.6. For
compatibility with non-conforming CAs, we allow the third option as exception,
but require the installation of such certificates locally.
2014-03-31 14:40:33 +02:00
Martin Willi a844b65890 revocation: Don't merge auth config of CLR/OCSP trustchain validation
This behavior was introduced with 6840a6fb to avoid key/signature strength
checking for the revocation trustchain as we do it for end entity certificates.
Unfortunately this breaks CA constraint checking under certain conditions, as
we merge additional intermediate/CA certificates to the auth config.

As key/signature strength checking of the revocation trustchain is a rather
exotic requirement we drop support for that to properly enforce CA constraints.
2014-03-31 14:40:33 +02:00
Tobias Brunner efce234de4 hashtable: Make key arguments const
This allows using const strings etc. for lookups without cast. And keys
are not modifiable anyway.
2014-03-31 14:32:45 +02:00
Tobias Brunner 3b09c02ec0 Properly hash pointers for hash tables where appropriate
Simply using the pointer is not optimal for our hash table
implementation, which simply masks the key to determine the bucket.
2014-03-31 14:32:44 +02:00
Tobias Brunner 7522fcffd2 kernel-pfroute: Let get_nexthop() default to destination address 2014-03-31 14:32:44 +02:00
Tobias Brunner 5119c5fe97 x509: CERT_DECODE actually requires KEY_ANY
More specific decoders might still be needed, but the x509
plugin should not care which ones.
2014-03-31 14:32:44 +02:00
Tobias Brunner 0524028054 pkcs1: KEY_ANY public key decoder soft depends on specific decoders 2014-03-31 14:32:44 +02:00
Tobias Brunner 00b91c4325 eap-radius: Add option to not close IKE_SAs on timeouts during interim accouting updates
Fixes #528.
2014-03-31 14:32:44 +02:00
Tobias Brunner a30e0001e4 ikev1: Accept SPI size of any length <= 16 in ISAKMP proposal
Fixes #533.
2014-03-31 14:32:44 +02:00
Tobias Brunner a213944d4a proposal: Don't fail DH proposal matching if peer includes NONE
The DH transform is optional for ESP/AH proposals. The initiator can
include NONE (0) in its proposal to indicate that while it prefers to
do a DH exchange, the responder may still decide to not do so.

Fixes #532.
2014-03-31 14:32:44 +02:00
Tobias Brunner 9fa7b03769 conf: Order settings in man page alphabetically
For the config snippets the options are now explicitly ordered before
subsections.
2014-03-31 14:32:44 +02:00
Martin Willi 1766ede330 Merge branch 'acerts'
(Re-)Introduces X.509 Attribute Certificate support in IKE, and cleans up the
x509 AC parser/generator. ACs may be stored locally or exchanged in IKEv2
CERT payloads, Attribute Authorities must be installed locally. pki --acert
issues Attribute Certificates and replaces the removed openac utility.
2014-03-31 12:14:55 +02:00
Martin Willi 8101e6aa17 NEWS: Add acert and pki changes for 5.1.3 2014-03-31 11:39:25 +02:00
Martin Willi dbd4fc074a openac: Remove obsolete openac utility
The same functionality is now provided by the pki --acert subcommand.
2014-03-31 11:39:25 +02:00
Martin Willi 3941d55f01 pki: Document --not-before/after and --dateform options in manpages 2014-03-31 11:39:25 +02:00
Martin Willi 2769a22e1f pki: Support absolute --this/next-update CRL lifetimes 2014-03-31 11:14:59 +02:00
Martin Willi d6e921181a pki: Support absolute --not-before/after issued certificate lifetimes 2014-03-31 11:14:59 +02:00
Martin Willi aa8732eb68 pki: Support absolute --not-before/after self-signed certificate lifetimes 2014-03-31 11:14:59 +02:00
Martin Willi 6f90e8e664 pki: Support absolute --not-before/after acert lifetimes 2014-03-31 11:14:59 +02:00
Martin Willi 06d3b6e9c9 pki: Add a certificate lifetime calculation helper function 2014-03-31 11:14:59 +02:00
Martin Willi babd848778 testing: Add an acert test that forces a fallback connection based on groups 2014-03-31 11:14:59 +02:00
Martin Willi 1a4d3222be testing: Add an acert test case sending attribute certificates inline 2014-03-31 11:14:59 +02:00
Martin Willi 9f676321a9 testing: Add an acert test using locally cached attribute certificates 2014-03-31 11:14:59 +02:00
Martin Willi c602ee65dc testing: build strongSwan with acert plugin 2014-03-31 11:14:59 +02:00
Martin Willi 3a2deb98bc ikev2: Cache all received attribute certificates to auth config 2014-03-31 11:14:59 +02:00
Martin Willi d417900335 ikev2: Send all known and valid attribute certificates for subject cert 2014-03-31 11:14:59 +02:00
Martin Willi a14f7edfb2 ikev2: Slightly refactor certificate payload construction to separate functions 2014-03-31 11:14:58 +02:00
Martin Willi f316116c88 ike: Support encoding of attribute certificates in CERT payloads 2014-03-31 11:14:58 +02:00
Martin Willi 83f8cdde46 auth-cfg: Declare an attribute certificate helper type to exchange acerts 2014-03-31 11:14:58 +02:00
Martin Willi 5ac0e66879 acert: Implement a plugin finding, validating and evaluating attribute certs
This validator checks for any attribute certificate it can find for validated
end entity certificates and tries to extract group membership information
used for connection authorization rules.
2014-03-31 11:14:58 +02:00
Martin Willi b06283f1e3 x509: Match acert has_subject() against entityName or holder serial
This allows us to find attribute certificates for a subject certificate in
credential sets.
2014-03-31 11:14:58 +02:00
Martin Willi 6e8c665a51 pki: Add acert and extend pki/print manpages 2014-03-31 11:14:58 +02:00