18383 Commits

Author SHA1 Message Date
Tobias Brunner
f2456376ae ike-rekey: Correctly destroy colliding rekey task
Using DESTROY_IF() this way doesn't correctly check if the pointer
is set.

Fixes: 7ffeed01c0d7 ("ike-rekey: Remove collision task type checks")
2022-09-15 12:16:12 +02:00
Tobias Brunner
5eeeb894d1 test-runner: Clean up collected run times 2022-09-15 12:16:12 +02:00
Martin Willi
b18fbde41e test-runner: Properly clean up allocated test suites 2022-09-15 12:16:12 +02:00
Martin Willi
432a846e66 unit-tests: Disable AddressSanitizer for threading cleanup function
As the cleanup function reads from the correct address on the parent frame,
it is currently unclear why AddressSanitizer complains about that pointer
dereference.
2022-09-15 12:16:12 +02:00
Martin Willi
7dce58135e unit-tests: Exclude memory checks after-free from AddressSanitizer
We explicitly test the memory we free()d if that got properly wiped, so suppress
the warning from AddressSanitizer.
2022-09-15 12:16:12 +02:00
Martin Willi
d840df185a utils: Define ADDRESS_SANITIZER_EXCLUDE to exclude a function from sanitizer 2022-09-15 12:16:12 +02:00
Martin Willi
1866d33538 utils: Support __has_feature() macro on non-LLVM compilers by returning 0 2022-09-15 12:16:12 +02:00
Tobias Brunner
ffada7cb5a pki: Correctly use int as precision specifier when printing PEM certificate 2022-09-14 17:38:59 +02:00
Tobias Brunner
644f74ad8f unit-tests: Add environment variable to only run specific iterations
Helpful when running with increased verbosity and only specific iterations
fail.
2022-09-12 16:13:51 +02:00
Andreas Steffen
a345e635c4 Version bumpt to 5.9.8dr3 5.9.8dr3 2022-09-07 06:38:42 +02:00
Andreas Steffen
747e840912 libstrongswan: Encode RSA-PSS algorithmIdentifier variant
Some third party IKEv2 products expect an RSA-PSS ASN.1
algorithmIdentifier with an explicit trailerField value (CONTEXT3)
instead of the DEFAULT value if the trailerField is missing.

The setting charon.rsa_pss_trailerfield = yes enables the explicit
encoding.
2022-09-06 21:15:43 +02:00
Andreas Steffen
bf3f678551 testing: Fixed two issues 2022-09-06 21:14:07 +02:00
Tobias Brunner
f4931ce7e6 testing: Add missing kernel config for 5.19
The config went missing when 057b3806aad4 ("Version bump to 5.9.8dr1")
changed the default kernel version.
2022-09-06 16:56:31 +02:00
Tobias Brunner
55f7268eb1 unit-tests: Let the TLS server thread close its own socket
Closing the socket from the main thread, while the server thread is
still in accept() (or is just about to enter it), seems to
occasionally cause a deadlock on macOS.
2022-09-06 15:40:32 +02:00
Boi Sletterink
c6b6ad8d89 testing: Add missing css dir to distribution tarballs
Add the css dir to the EXTRA_DIST variable in the Makefile for the test
environment. This dir was missing when generating distribution tarballs.
Adding it enables successful builds of the test environment from the
dist tarballs.

Fixes: 63f35993d9fb ("testing: Use sans-serif font for test results")
Closes strongswan/strongswan#1266
2022-09-06 09:49:45 +02:00
Tobias Brunner
0f6b0380a8 ipsec: Remove scepclient from usage output 2022-09-06 09:33:00 +02:00
Tobias Brunner
befdefa5d3 starter: Fix comment for debug function 2022-09-06 09:33:00 +02:00
Tobias Brunner
73f6047a77 conf: Remove config snippet for scepclient 2022-09-06 09:33:00 +02:00
Tobias Brunner
c9ccec9bc3 configure: Remove AC_SUBST for unused variable 2022-09-06 09:33:00 +02:00
Tobias Brunner
7bc491a7fa android: Remove scepclient from old top-level Android.mk 2022-09-06 09:33:00 +02:00
Tobias Brunner
73901d2cc3 github: Remove --enable-scepclient from macOS build options 2022-09-06 09:33:00 +02:00
Tobias Brunner
879ffd7ece unit-tests: Make TLS echo server cancelable
Seems to be required on macOS (libtls tests didn't run before the recent
implicit enabling via pki).  Other platforms apparently let accept() fail
if the socket is shutdown/closed in teardown_creds(), macOS apparently
doesn't do that.
2022-09-06 09:33:00 +02:00
Tobias Brunner
88859b506c libtls: Fix encoding of TLS 1.3 certificate extension as server
Same as 9664ef4ba60f ("libtls: Fixed encoding of TLS 1.3 certificate
extension") but for the server.
2022-09-06 09:33:00 +02:00
Tobias Brunner
023070b6d0 Use wolfSSL 5.5.0 for tests 2022-09-06 09:33:00 +02:00
Andreas Steffen
af3b8c49c5 Version bump to 5.9.8dr2 5.9.8dr2 2022-09-02 06:32:13 +02:00
Andreas Steffen
3fa3d2666a pki: pki --req can use old certreq as template
When an X.509 certificate has to be renewed it is helpful to use
the old PKCS#10 certificate request as a template, so that the
distinguishedName (DN), the subjectAlternativeName (SAN) and
a certificate profile name don't have to be typed-in again.

The old public key in the existing certreq is replaced with the
new key and the signature is re-generated using the new private key.
2022-08-31 15:10:34 +02:00
Andreas Steffen
359b5739f4 pki: Fixed memory leak in pki --scep 2022-08-28 11:42:13 +02:00
Andreas Steffen
3b2b7a3bee pki: Fixed filenames in pki --estca/--scepca man pages 2022-08-27 09:51:05 +02:00
Noel Kuntze
dbe3de7bb9 connmark: Fix wrong plugin name in log message
Closes strongswan/strongswan#1244
2022-08-26 17:00:18 +02:00
Andreas Steffen
057b3806aa Version bump to 5.9.8dr1 5.9.8dr1 2022-08-26 12:32:04 +02:00
Andreas Steffen
e4cb9a59d2 testing: Fixed typo of mfg1 to mgf1 plugin 2022-08-26 12:31:33 +02:00
Andreas Steffen
74893da403 Merge branch 'pki-scep' 2022-08-26 12:19:17 +02:00
Andreas Steffen
6e860fb07c leak_detective: Whitelist botan_privkey_load_rsa_pkcs1() 2022-08-26 12:17:22 +02:00
Andreas Steffen
52a3c3662d libtls: the signature unit tests use scheme-specific credentials 2022-08-26 12:17:22 +02:00
Andreas Steffen
63fd718915 libtls: call create_public_enumerator() with key_type 2022-08-26 12:17:22 +02:00
Andreas Steffen
a417703301 libtls: enforce correct signature scheme for ECDSA keys 2022-08-26 12:17:22 +02:00
Andreas Steffen
77a15f55be libtls: unit tests with crypto libs need additional plugins
In order for libtls to run with the gcrypt libraryi, additionally the
random, pem, gcm, hmac, kdf, x509, constraints, and the curve2519
plugins are needed.

The botan library additionally need the hmac (for HMAC_MD5), x509 and
constraints plugins.

The wolfssl library additionally need the pkcs1, pkcs8, x509 and constraints
plugins.
2022-08-25 10:51:05 +02:00
Andreas Steffen
9664ef4ba6 libtls: Fixed encoding of TLS 1.3 certificate extension 2022-08-25 10:51:05 +02:00
Andreas Steffen
784606a827 pki: use libtls for pki --est|--estca 2022-08-25 10:50:40 +02:00
Andreas Steffen
976c74b772 pki: --est adds --keyid and --certid options
With the --keyid option private keys stored on a smartcard or in
a TPM 2.0 can be used for public key based client authentication.

With the --certid option the corresponding client certificate
can reside on a smartcard or a TPM 2.0.
2022-08-25 07:02:29 +02:00
Andreas Steffen
2b53b1055d pki: Optimize certificate download for --scep and --est 2022-08-25 07:02:29 +02:00
Andreas Steffen
b392fbd68c libtls: unit tests run with default plugins
The gcm plugin has been added to the default plugins and all
certificate types are loaded to allow the libtls socket unit
tests to run with the strongSwan default plugins.
2022-08-25 07:02:29 +02:00
Andreas Steffen
a3914d7db5 libtls: Send empty cert payload upon cert request
Currently when a TLS client doesn't have a certificate, it doesn't
send a certficiate payload upon receiving a certificate request
from the TLS server. According to the TLS 1.2 and 1.3 RFCs an
empty certificate payload must be sent.
2022-08-25 07:02:29 +02:00
Andreas Steffen
60a764bad9 pki: use libtls for pki --est 2022-08-25 07:02:29 +02:00
Andreas Steffen
c2dc5f69ca pki: Created pki --est man page 2022-08-25 07:02:29 +02:00
Andreas Steffen
ba1d8aba32 pki: Enroll an X.509 certificate with an EST server 2022-08-25 07:02:29 +02:00
Andreas Steffen
7e5daec56e pki: Created pki --estca man page 2022-08-25 07:02:29 +02:00
Andreas Steffen
b16c0e928e pki: Clean up SCEP functions 2022-08-24 20:46:44 +02:00
Andreas Steffen
ba76a9f5ff pki: Get CA certs via EST (RFC 7030) 2022-08-24 20:46:44 +02:00
Andreas Steffen
1ef8b92211 pkcs10: Support of Microsoft CertTypeExtension
The msCertificateTypeExtension OID (1.3.6.1.4.1.311.20.2) can
be used in a PKCS#10 certificate request to define a certificate
profile. It consists of an UTF8 string.

pki: profile option
2022-08-24 20:46:44 +02:00