Commit Graph

94 Commits

Author SHA1 Message Date
René Fischer 4261fcedec botan: Use strongSwan's RNG interface in Botan plugin
This allows using rng_t implementations provided by other plugins to
serve as RNG for Botan.

Closes strongswan/strongswan#192.
2021-02-15 09:27:51 +01:00
Andreas Steffen 9b4a2322d6 libimcv: Evaluate IMA SHA-256 measurements 2021-01-08 11:00:15 +01:00
Tobias Brunner f3f93cade9 load-tester: Also request a virtual IPv6 address
Fixes #3595.
2020-10-27 16:40:38 +01:00
Andreas Steffen 3ef5b23903 pts: Variable size PCR banks 2020-10-07 16:54:32 +02:00
Josh Soref b3ab7a48cc Spelling fixes
* accumulating
* acquire
* alignment
* appropriate
* argument
* assign
* attribute
* authenticate
* authentication
* authenticator
* authority
* auxiliary
* brackets
* callback
* camellia
* can't
* cancelability
* certificate
* choinyambuu
* chunk
* collector
* collision
* communicating
* compares
* compatibility
* compressed
* confidentiality
* configuration
* connection
* consistency
* constraint
* construction
* constructor
* database
* decapsulated
* declaration
* decrypt
* derivative
* destination
* destroyed
* details
* devised
* dynamic
* ecapsulation
* encoded
* encoding
* encrypted
* enforcing
* enumerator
* establishment
* excluded
* exclusively
* exited
* expecting
* expire
* extension
* filter
* firewall
* foundation
* fulfillment
* gateways
* hashing
* hashtable
* heartbeats
* identifier
* identifiers
* identities
* identity
* implementers
* indicating
* initialize
* initiate
* initiation
* initiator
* inner
* instantiate
* legitimate
* libraries
* libstrongswan
* logger
* malloc
* manager
* manually
* measurement
* mechanism
* message
* network
* nonexistent
* object
* occurrence
* optional
* outgoing
* packages
* packets
* padding
* particular
* passphrase
* payload
* periodically
* policies
* possible
* previously
* priority
* proposal
* protocol
* provide
* provider
* pseudo
* pseudonym
* public
* qualifier
* quantum
* quintuplets
* reached
* reading
* recommendation to
* recommendation
* recursive
* reestablish
* referencing
* registered
* rekeying
* reliable
* replacing
* representing
* represents
* request
* request
* resolver
* result
* resulting
* resynchronization
* retriable
* revocation
* right
* rollback
* rule
* rules
* runtime
* scenario
* scheduled
* security
* segment
* service
* setting
* signature
* specific
* specified
* speed
* started
* steffen
* strongswan
* subjectaltname
* supported
* threadsafe
* traffic
* tremendously
* treshold
* unique
* uniqueness
* unknown
* until
* upper
* using
* validator
* verification
* version
* version
* warrior

Closes strongswan/strongswan#164.
2020-02-11 18:23:07 +01:00
Thomas Egerer a605452c03 kernel-netlink: Check for offloading support in constructor
This avoids races that could potentially occur when doing the check during
SA installation.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2019-11-26 11:00:28 +01:00
Andreas Steffen 6d3a743d90 ntru: Replaced ntru_drbg by drbg 2019-10-16 16:46:24 +02:00
Andreas Steffen 737375a2d2 drbg: Implemented NIST SP-800-90A DRBG 2019-10-16 16:46:24 +02:00
Tobias Brunner b9949e98c2 Some whitespace fixes
Didn't change some of the larger testing scripts that use an inconsistent
indentation style.
2019-08-22 15:18:06 +02:00
Tobias Brunner d3329ee540 wolfssl: Fixes, code style changes and some refactorings
The main fixes are

 * the generation of fingerprints for RSA, ECDSA, and EdDSA
 * the encoding of ECDSA private keys
 * calculating p and q for RSA private keys
 * deriving the public key for raw Ed25519 private keys

Also, instead of numeric literals for buffer lengths ASN.1 related
constants are used.
2019-04-24 12:26:08 +02:00
Andreas Steffen 526c5abd0f tpm: Check FIPS-140-2 and FIPS-186-4 compliance 2018-10-26 09:55:07 +02:00
Andreas Steffen f649a13cc6 imc-swima: Support subscriptions 2018-07-29 10:37:36 +02:00
Andreas Steffen b9d6b3c3e2 libtpmss: Configure TCTI device options 2018-07-20 19:19:24 +02:00
Andreas Steffen e74e920bbc libtpmtss: Support for TSS2 v2 libraries 2018-07-19 12:40:42 +02:00
Tobias Brunner 707b70725a dhcp: Only use DHCP server port if explicitly configured
If a DHCP server is running on the same host it isn't necessary to
bind the server port and might even cause conflicts.
2018-07-02 11:39:22 +02:00
Tobias Brunner 57447015db eap-radius: Document station_id_with_port option 2018-06-25 10:42:17 +02:00
Andreas Steffen a31f9b7691 libimcv: Removed TCG SWID IMC/IMV support 2018-06-12 21:47:39 +02:00
Tobias Brunner 7b660944b6 dhcp: Only send client identifier if identity_lease is enabled
The client identifier serves as unique identifier just like a unique MAC
address would, so even with identity_leases disabled some DHCP servers
might assign unique leases per identity.
2018-05-18 18:04:01 +02:00
Tobias Brunner e811659323 kernel-pfkey: Add option to install routes via internal interface
On FreeBSD, enabling this selects the correct source IP when sending
packets from the gateway itself.
2018-03-21 10:37:49 +01:00
Tobias Brunner 1da1ba01c4 save-keys: Add options to enable saving IKE and/or ESP keys 2018-02-15 23:03:29 +01:00
Codrut Cristian Grosu 88e151d10d save-keys: Store derived CHILD_SA keys in Wireshark format 2018-02-15 23:03:29 +01:00
Codrut Cristian Grosu 4be7db5f60 save-keys: Store derived IKE_SA keys in Wireshark format
The path has to be set first, otherwise, nothing is done.
2018-02-15 23:03:29 +01:00
Codrut Cristian Grosu 345cd4684c save-keys: Add save-keys plugin
This plugin will export IKE_SA and CHILD_SA secret keys in the format used
by Wireshark.

It has to be loaded explicitly.
2018-02-15 23:03:29 +01:00
Tobias Brunner ce048c30ff ha: Double receive buffer size for HA messages and make it configurable
With IKEv1 we transmit both public DH factors (used to derive the initial
IV) besides the shared secret.  So these messages could get significantly
larger than 1024 bytes, depending on the DH group (modp2048 just about
fits into it).  The new default of 2048 bytes should be fine up to modp4096
and for larger groups the buffer size may be increased (an error is
logged should this happen).
2018-02-14 14:52:18 +01:00
Tobias Brunner 2db6d5b8b3 Fixed some typos, courtesy of codespell 2018-02-13 12:19:54 +01:00
Tobias Brunner 4664992f7d kernel-netlink: Optionally trigger roam events on routing rule changes
This can be useful if routing rules (instead of e.g. route metrics) are used
to switch from one to another interface (i.e. from one to another
routing table).  Since we currently don't evaluate routing rules when
doing the route lookup this is only useful if the kernel-based route
lookup is used.

Resolves strongswan/strongswan#88.
2018-02-09 15:51:28 +01:00
Andreas Steffen acfd590ab6 imc-os: Derive device ID from private key bound to smartcard or TPM 2017-12-10 11:51:50 +01:00
Tobias Brunner c81b87ac26 systime-fix: Add timeout option to stop waiting for valid system time
A certificate check is forced once the timeout is reached even if the
system time appears to be invalid.
2017-11-08 16:20:35 +01:00
Tobias Brunner 655924074b eap-radius: Optionally send Class attributes in RADIUS accounting messages
If enabled, add the RADIUS Class attributes received in Access-Accept messages
to RADIUS accounting messages as suggested by RFC 2865 section 5.25.

Fixes #2451.
2017-11-02 09:57:05 +01:00
Tobias Brunner e66c3d41bc conf: Descriptions of several settings updated 2017-08-08 17:28:01 +02:00
Andreas Steffen 88501a64ca swid-gen: Share SWID generator between sw-collector, imc-swima and imc-swid 2017-08-04 19:15:26 +02:00
Tobias Brunner 67402ec77b curl: Enable following redirects
The maximum number of redirects can be limited. The functionality can also
be disabled.

Fixes #2366.
2017-07-27 13:15:43 +02:00
Andreas Steffen 49d56e1b39 imv-swima: Implemented SW event processing 2017-07-08 23:19:51 +02:00
Andreas Steffen 3a7c594c14 imv-swima: Created SWIMA IMV plugin 2017-07-08 23:19:51 +02:00
Andreas Steffen 2821c0f740 imc-swima: Created SWIMA IMC plugin 2017-07-08 23:19:51 +02:00
Tobias Brunner 1aba82bfd7 eap-aka-3gpp: Add plugin that implements 3GPP MILENAGE algorithm in software
This is similar to the eap-aka-3gpp2 plugin. K (optionally concatenated
with OPc) may be configured as binary EAP secret in ipsec.secrets or
swanctl.conf.

Based on a patch by Thomas Strangert.

Fixes #2326.
2017-07-05 10:03:38 +02:00
Tobias Brunner 70855696ad kernel-netlink: Use total retransmit timeout as acquire timeout
By using the total retransmit timeout, modifications of timeout settings
automatically reflect on the value of xfrm_acq_expires.  If set, the
value of xfrm_acq_expires configured by the user takes precedence over
the calculated value.
2017-05-23 18:05:58 +02:00
Martin Willi 9b29003cd9 socket-default: Add an option to force the sending interface via IP_PKTINFO
On Linux, setting the source address is insufficient to force a packet to be
sent over a certain path. The kernel uses the best route to select the outgoing
interface, even if we set a source address of a lower priority interface. This
is not only true for interfaces attaching to the same subnet, but also for
unrelated interfaces; the kernel (at least on 4.7) sends out the packet on
whatever interface it sees fit, even if that network does not expect packets
from the source address we force to.

When a better interface becomes available, strongSwan sends its MOBIKE address
list update using the old source address. But the kernel sends that packet over
the new best interface. If that network drops packets having the unexpected
source address from the old path, the MOBIKE update fails and the SA finally
times out.

To enforce a specific interface for our packet, we explicitly set the interface
index from the interface where the source address is installed. According to
ip(7), this overrules the specified source address to the primary interface
address. As this could have side effects to installations using multiple
addresses on a single interface, we disable the option by default for now.

This also allows using IPv6 link-local addresses, which won't work if
the outbound interface is not set explicitly.
2017-05-23 16:49:39 +02:00
Tobias Brunner a1aede8065 attr-sql: Make release of online leases during startup optional
This cleanup prevents sharing the same DB between multiple VPN gateways.
2017-05-19 15:22:51 +02:00
Andreas Steffen 2b233c8a64 The tpm plugin offers random number generation
The tpm plugin can be used to derive true random numbers from a
TPM 2.0 device. The get_random method must be explicitly enabled
in strongswan.conf with the plugin.tpm.use_rng = yes option.
2017-03-20 21:16:10 +01:00
Martin Willi d1317adb9a addrblock: Support an optional non-strict mode accepting certs without addrblock
This allows a gateway to enforce the addrblock policy on certificates that
actually have the extension only. For (legacy) certificates not having the
extension, traffic selectors are validated/narrowed by other means, most
likely by the configuration.
2017-03-02 08:24:02 +01:00
Tobias Brunner 2de9bb30fe revocation: More accurately describe the flags to disable OCSP/CRL validation
These options disable validation as such, e.g. even from cached CRLs, not
only the fetching.  Also made the plugin's validate() implementation a
no-op if both options are disabled.
2017-02-15 10:41:38 +01:00
Tobias Brunner 0aabfe0780 bypass-lan: Allow ignoring or only considering subnets of specific interfaces
The config can also be reloaded by sending a SIGHUP to charon.
2017-02-08 10:38:28 +01:00
Tobias Brunner 124a1eb8cf pkcs11: Fix documentation of load_certs option
This option is actually module-specific.
2017-02-06 11:18:47 +01:00
Thomas Egerer 8a91729dfe kernel-netlink: Allow change of Netlink socket receive buffer size
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2017-01-25 17:42:38 +01:00
Andreas Steffen e3f63c6469 revocation: OCSP and/or CRL fetching can be disabled 2016-12-30 18:12:53 +01:00
Tobias Brunner ac9759a532 kernel-netlink: Support configuring XFRM policy hashing thresholds
If the number of flows over a gateway exceeds the flow cache size of the Linux
kernel, policy lookup gets very expensive. Policies covering more than a single
address don't get hash-indexed by default, which results in wasting most of
the cycles in xfrm_policy_lookup_bytype() and its xfrm_policy_match() use.
Starting with several hundred policies the overhead gets inacceptable.

Starting with Linux 3.18, Linux can hash the first n-bit of a policy subnet
to perform indexed lookup. With correctly chosen netbits, this can completely
eliminate the performance impact of policy lookups, freeing the resources
for ESP crypto.

WARNING: Due to a bug in kernels 3.19 through 4.7, the kernel crashes with a
NULL pointer dereference if a socket policy is installed while hash thresholds
are changed.  And because the hashtable rebuild triggered by the threshold
change that causes this is scheduled it might also happen if the socket
policies are seemingly installed after setting the thresholds.
The fix for this bug - 6916fb3b10b3 ("xfrm: Ignore socket policies when
rebuilding hash tables") - is included since 4.8 (and might get backported).
As a workaround `charon.plugins.kernel-netlink.port_bypass` may be enabled
to replace the socket policies that allow IKE traffic with port specific
bypass policies.
2016-09-30 14:54:52 +02:00
Tobias Brunner 528c40017e conf: Extend description of charon.plugins.kernel-netlink.xfrm_acq_expires 2016-08-29 18:02:30 +02:00
Andreas Steffen 57e80492eb libtpmtss: Implemented TSS2 quote() method 2016-06-26 18:19:05 +02:00
Andreas Steffen 30d4989aec libimcv: migrate pts to tpm_tss 2016-06-22 15:33:44 +02:00