1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00
Commit Graph

9 Commits

Author SHA1 Message Date
Vladimir Stoiakin
85686b37b0 cryptenroll: allow to use a public key on a token
This patch allows systemd-cryptenroll to enroll directly with a public key if a certificate is missing on a token.

Fixes: #30675
2024-02-03 03:00:51 +09:00
Vladimir Stoiakin
85828ef920 cryptenroll: change class in provided PKCS#11 URI if necessary
cryptenroll accepts only PKCS#11 URIs that match both a certificate and a private key in a token.
This patch allows users to provide a PKCS#11 URI that points to a certificate only, and makes possible to use output of some PKCS#11 tools directly.
Internally the patch changes 'type=cert' in the provided PKCS#11 URI to 'type=private' before storing in a LUKS2 header.

Fixes: #23479
2024-01-05 12:32:36 +03:00
Vladimir Stoiakin
a3c1b0d74c TEST-24-CRYPTSETUP: add test for PKCS#11 tokens
Introduces new dependencies on SoftHSM, OpenSC and GnuTLS for the test.
2023-12-20 11:52:18 +03:00
Luca Boccassi
c9be8e420e cryptsetup: use WantsMountsFor= for key/header when nofail is set
The header and keyfile are necessary only for opening the device, not
for closing, so it is not necessary to deactivate the generated
cryptsetup unit when the header or keyfile backing store are removed.

This is especially useful in the case of softreboot, when the new
mount root is setup under /run/nextroot/ but we don't want to close
the cryptsetup devices for encrypted /var/ or so, and we simply
mount it directly on /run/nextroot/var/ before the soft-reboot.
2023-11-29 11:04:59 +00:00
Frantisek Sumsal
07268394d6 test: unify /testok & /failed handling
And drop it where not necessary.
2023-07-12 16:03:40 +02:00
Frantisek Sumsal
eb26f34a09 test: add a couple more tests for systemd-cryptsetup 2023-06-05 16:50:13 +02:00
Zbigniew Jędrzejewski-Szmek
9309a23b95 test: switch TEST-02-CRYPTSETUP and TEST-24-UNITTESTS
When tests are executed serially (the default), it seems better to launch
the fairly generic test that runs the unittests early in the sequence.
Right now the tests are ordered based on when they were written, but
this doesn't make much sense.
2020-09-24 17:02:20 +02:00
Zbigniew Jędrzejewski-Szmek
4962ed9f33 test: make sure to reset state before starting integration tests 2020-03-28 11:51:27 +01:00
Zbigniew Jędrzejewski-Szmek
f4c40fd754 test: move TEST-24-UNIT-TESTS setup to static files
I picked the list of zone files to install by grepping through the code. This
is is a bit brittle, but installing all of them takes a while, and more
importantly, writes a lot of lines to the log.
2020-03-28 11:46:47 +01:00