18062 Commits

Author SHA1 Message Date
Tobias Brunner
f556fce16b openssl: Load "legacy" provider in OpenSSL 3 for algorithms like MD4, DES etc.
We still require these algorithms for e.g. EAP-MSCHAPv2, so the option is
enabled, by default.  To use other providers (e.g. fips or even custom
ones), the option can be disabled and the providers to load/activate can
be configured in openssl.cnf.  For instance, the following has the same
effect as enabling the option:

    openssl_conf = openssl_init

    [openssl_init]
    providers = providers

    [providers]
    default = activate
    legacy = activate

    [activate]
    activate = yes
2021-12-08 11:34:13 +01:00
Tobias Brunner
8baa431501 Merge branch 'libtls-tests'
Improves handling failures during unit tests of libtls and includes a
change for the openssl plugin so it only announces ECDH groups for which
the library provides the required ECC curve.

Closes strongswan/strongswan#752
2021-12-08 11:33:32 +01:00
Tobias Brunner
46a6b06282 openssl: Only announce ECDH groups actually supported by OpenSSL
Determined by whether the library provides curves for it or not.
For instance, in the OpenSSL 3 FIPS provider the Brainpool curves are
not included.  And in the Fedora package several weak curves are
explicitly patched out and the Brainpool curves are omitted even in
non-FIPS mode.
2021-12-08 11:33:04 +01:00
Tobias Brunner
03520a0d54 openssl: Add helper to map ECDH groups to curve NIDs 2021-12-08 11:32:59 +01:00
Tobias Brunner
88e7654c6c libtls: Shutdown server socket in test teardown function
If a test fails and the server thread is blocked reading on the socket,
it would stay stuck.
2021-12-08 11:32:55 +01:00
Tobias Brunner
d95381ec7a tls-socket: Handle sending fatal errors better
In particular as server, the previous code might cause it to hang in
recv() if this case wasn't triggered by a close notify (followed by a
shutdown of the socket) but it e.g. failed processing a ServerHello and
responded with a fatal alert.

Fixes: 09fbaad6bd71 ("tls-socket: Don't fail reading if sending data failed")
2021-12-08 11:32:50 +01:00
Andreas Steffen
01485770fd gcrypt: Support of AES-CFB encryption 2021-12-06 13:43:45 +01:00
Andreas Steffen
2d1a1cc907 botan: Support of AES-CFB encryption 2021-12-06 13:28:31 +01:00
Andreas Steffen
54d7e39d40 wolfssl: Support of AES-CFB encryption 2021-12-06 12:53:11 +01:00
Andreas Steffen
695a04d146 openssl: Support of AES-CFB encryption 2021-12-06 12:52:37 +01:00
Tobias Brunner
dcaf9b38f3 child-rekey: Uninstall old outbound SA earlier on initiator/winner
This is useful for kernel implementations where the ordering of SAs
is unpredictable and the new SA might otherwise not be used until the
DELETE response has been received, which is not ideal as the responder
might not keep the old SA around that long.  On Linux, it makes no
difference as we switch to the new outbound SA immediately because the
updated outbound policy references its SPI.
2021-12-01 11:00:40 +01:00
Tobias Brunner
e9ba195910 github: Run charon-tkm tests
Use a Debian-based Docker container to run the unit tests for charon-tkm,
once without and once with TKM running.  The container can also be used
locally to run the tests (see comments in the Dockerfile).
2021-11-29 15:30:43 +01:00
Tobias Brunner
66fd0c4db7 charon-tkm: Make only tests requiring TKM optional
This way we can run many unit tests without having to run the TKM in the
background and as regular user.  To run the other tests, TESTS_TKM can
optionally be defined when running `make check`.
2021-11-29 15:29:22 +01:00
Tobias Brunner
43927e60a7 Revert "testing: Don't run tests when building tkm"
This reverts commit e74bca9e1952cfe4f27f68afeb72be2af56a1256.
2021-11-29 15:06:57 +01:00
Tobias Brunner
6b9c8a674f Revert "testing: Don't run tests when building tkm-rpc"
Let's try that again on current systems.

This reverts commit 9c2aba2735b5b54a892b50e2224008bc0cde4267.
2021-11-29 15:06:57 +01:00
zhangxiaojun
df0999ec93 android: Improved simplified Chinese translation / 完善了简体中文翻译
Closes strongswan/strongswan#779
2021-11-26 15:45:53 +01:00
Tobias Brunner
e43052893d vici: Fix check before applying identity to public keys 2021-11-23 16:15:41 +01:00
Tobias Brunner
deb288ddc1 testing: Increase memory of winnetou
Looks like named requires a lot more memory than previously so that
Apache seems to struggle serving the test results sometimes.
2021-11-19 15:27:58 +01:00
Andreas Steffen
4124b1d376 Version bump to 5.9.5dr2 5.9.5dr2 2021-11-18 22:06:09 +01:00
Tobias Brunner
11b10bc2b0 farp: Fix incompatible function types warning 2021-11-17 18:21:30 +01:00
Tobias Brunner
cceca1a3c4 eap-radius: Fix incompatible function types warnings 2021-11-17 18:18:09 +01:00
Tobias Brunner
9b2e9a943c processor: Fix incompatible function types warnings 2021-11-17 18:06:20 +01:00
Tobias Brunner
0917edb468 blocking-queue: Fix incompatible function types warning 2021-11-17 17:46:27 +01:00
Andreas Steffen
fe5399d287 Merge branch 'rsa-oaep-encryption' 2021-11-11 10:03:17 +01:00
Andreas Steffen
519db56f2f testing: Added RSA PKCS1 encryption tests 2021-11-10 21:06:10 +01:00
Andreas Steffen
6bb5c4f2bb testing: Added RSA OAEP encryption tests 2021-11-10 21:06:10 +01:00
Andreas Steffen
93bf894cd2 gcrypt: Support RSA OAEP SHA1 encryption/decryption 2021-11-10 21:06:10 +01:00
Andreas Steffen
b50e8a88ff gcrypt: Enable RSA PKCS1 encryption/decryption 2021-11-10 20:17:49 +01:00
Andreas Steffen
be52ad7c6d botan: RSA OAEP labels are not supported 2021-11-10 20:03:22 +01:00
Andreas Steffen
9cfdc32597 wolfssl: Support OAEP labels 2021-11-10 20:03:22 +01:00
Andreas Steffen
6adb543341 openssl: Implemented RSA OAEP encryption/decryption with optional labels 2021-11-10 20:03:22 +01:00
Andreas Steffen
4abb29f639 credentials: Added void *params to public_key encrypt() and private_key decrypt() methods 2021-11-09 17:58:28 +01:00
Andreas Steffen
c8341fca61 botan: Fully enable RSA OAEP decryption 2021-11-09 17:58:28 +01:00
Tobias Brunner
f4bfdec21f kernel-pfroute: Set lower MTU on TUN devices
The default MTU of 1500 is too high if kernel-libipsec is used (considering
the overhead of UDP-encapsulated ESP), but might also have an effect if
a TUN device is only used to install a virtual IP (the route points to it,
so the system might use its MTU and 1500 would still be too high).

This also works around an issue on macOS 12 where no RTM_IFINFO event
is sent for the newly created TUN device (neither for the creation,
setting it "up", nor adding the address).  Changing the MTU, however,
triggers such an event and we can detect the virtual IP.

Closes strongswan/strongswan#707
2021-11-09 09:43:01 +01:00
Tobias Brunner
eb19699a7a ike: Fix length of vendor ID Cisco VPN 3000 client
The actual length of the data is 16 bytes.

Fixes: 6c49ddfbca72 ("ike: Add additional Vendor IDs for third-party implementations")
2021-11-03 11:01:09 +01:00
Volker Rümelin
9747376c69 ike: Fix prefix length and data of vendor ID Cisco VPN Concentrator
Currently the length of vendor ID Cisco VPN Concentrator is 16
bytes but the string has only 13+1 bytes. The actual vendor
ID has 16 bytes with a prefix length of 14 bytes and two version
bytes.

Fixes: 6c49ddfbca72 ("ike: Add additional Vendor IDs for third-party implementations")
2021-11-03 11:01:09 +01:00
Volker Rümelin
865a387c6c ikev1: Fix prefix length of vendor ID Cisco Unity
Before commit 6c49ddfbca ("ike: Add additional Vendor IDs for
third-party implementations") the prefix length of vendor ID
Cisco Unity was hardcoded to 14. Since we need to know the actual
length of this VID to send it, the length can't be overloaded
with a prefix length. Revert part of commit 6c49ddfbca to
fix this problem.

Fixes: 6c49ddfbca72 ("ike: Add additional Vendor IDs for third-party implementations")
2021-11-03 11:00:59 +01:00
Volker Rümelin
5e1d1cd30f ikev1: Fix prefix length of vendor ID MS NT5 ISAKMPOAKLEY
Before commit 6c49ddfbca ("ike: Add additional Vendor IDs for
third-party implementations") the prefix length of vendor ID
MS NT5 ISAKMPOAKLEY was hardcoded to 16. Change the prefix length
accordingly.

Fixes: 6c49ddfbca72 ("ike: Add additional Vendor IDs for third-party implementations")
2021-11-03 10:25:51 +01:00
Tobias Brunner
d1278ed926 Use wolfSSL 5.0.0 for tests 2021-11-02 09:41:25 +01:00
Tobias Brunner
e19eb070fa Use Botan 2.18.2 for tests 2021-10-29 09:07:38 +02:00
Andreas Steffen
bcbf1862d7 Version bump to 5.9.5dr1 5.9.5dr1 2021-10-26 08:04:19 +02:00
Andreas Steffen
f0935a63ed testing: Optimized plugin use in pkcs8 scenarios 2021-10-23 11:44:15 +02:00
Andreas Steffen
9c7288d6f1 testing: Minimum required plugins for net2net-pkcs12 scenarios 2021-10-22 11:39:20 +02:00
Tobias Brunner
8c48de739d testing: Use AES and SHA-256 to protect PKCS#12 files
The -aes128 option is used when encrypting private keys read from a
PKCS#12 file, not when generating such a file.
2021-10-18 14:27:14 +02:00
Andreas Steffen
66fa7c959a Version bump to 5.9.4 5.9.4 2021-10-18 11:45:53 +02:00
Andreas Steffen
8cc89b505e testing: Correctly remove pkcs8 key after test case 2021-10-18 11:45:31 +02:00
Tobias Brunner
fed5c7e0d4 NEWS: Add news for 5.9.4 2021-10-18 11:27:29 +02:00
Tobias Brunner
d6d31fce23 pkcs8: Don't forward NULL parameters when parsing keys
Other plugins don't expect this build part for RSA keys and will fail
parsing the keys further.
2021-10-18 11:24:11 +02:00
Tobias Brunner
02e4f994ec signature-params: Reject schemes other than RSASSA-PSS with parameters
NULL parameters (for classic PKCS#1 signature schemes) are explicitly
allowed (for any schemes for now), but we only expect parameters for
RSASSA-PSS.  Before enforcing this, it was possible to modify the
parameters in the signatureAlgorithm field of the outer X.509 Certificate
structure to something different than the signature field of the signed,
inner tbsCertificate structure, allowing generating infinite versions
of valid certificates with different binary encodings.  Now we accept at
most two (NULL and absent parameters).
2021-10-14 18:59:07 +02:00
Tobias Brunner
f061dedcb7 asn1: Return any parameters of algorithmIdentifier structures
Previously, only parameters of type OID, SEQUENCE and OCTET STRING were
returned (so e.g. random integers could be put in parameters and we
wouldn't know about it).

Log output is basically the same as with asn1_parser_t before, except
that parameters are always dumped (if any), that wasn't the case before
because ASN1_RAW (instead of ASN1_OBJ) was used.
2021-10-14 18:59:07 +02:00