Commit Graph

9 Commits

Author SHA1 Message Date
Stefan Berger
7243fddab6 sample: Enable passing usual curve names secp256r1 or secp384r1
Enable passing the usual curve names of secp256r1 and secp384r1 instead
of ecc256 and ecc384 on the command line of swtpm-create-tpmca.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2025-04-01 12:50:34 -04:00
Stefan Berger
58c9549cdc samples: Support different key algorithms for created TPM 2 CA
Extend swtpm-create-tpm to support rsa2048 (default), rsa3072, ecc256
(NIST P256), and ecc384 (NIST P384) for the created TPM 2 CA. The names
are taken from the output of:

  tpm2_ptool addkey --help

ecc521 does not seem to work with the TPM 2 stack even though it is
advertised as a possible option.

Extend an existing test case to create an ecc256 key and extend man page.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2025-03-30 19:17:25 -04:00
Stefan Berger
ec792ce855 tests: Convert more test cases to rely on variables from common
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-08-26 20:00:14 -04:00
Stefan Berger
e5ccc7bb37 tests: Fix shellcheck issue SC2115 by using "${var:?}"
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-01-29 15:04:00 -05:00
Stefan Berger
5704342aa8 tests: Fix shellcheck issue SC2181 by if cmd; ...
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-01-27 11:58:54 -05:00
Stefan Berger
4cad2bb32e tests: Fix shellcheck issue SC2143 by using grep -q
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-01-26 08:12:59 -05:00
Stefan Berger
fd7a812b24 tests: Fix code to pass shellcheck with some errors disabled
Fix the test cases to pass shellcheck with some of the errors
disable.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2023-01-13 13:59:02 -05:00
Stefan Berger
cce7503cbf tests: exit with error code if mktemp fails
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-11-02 08:35:49 -04:00
Stefan Berger
3c10960c25 tests: Fix tests using tpm2-abrmd by preventing concurrency
The two tests test_tpm2_samples_create_tpmca and
test_tpm2_swtpm_localca_pkcs11 cannot complete successfully if run in
parallel. To solve this issue, introduce a dependency via the log files
to prevent parallel execution of the two test. We have to append the
.test suffix to their names to be able to do this.

docs:
https://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html

Resolves issue #501, though the problem with stability of the tpm2 pkcs11
module is not resolved.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-09-27 09:17:54 -04:00