Commit graph

22 commits

Author SHA1 Message Date
Nicki Křížek
f2cb2e5723 Remove invocations and mentions of clean.sh 2024-11-08 10:54:24 +01:00
Nicki Křížek
7c259fe254 Replace clean.sh files with extra_artifacts mark
The artifact lists in clean.sh and extra_artifacts might be slightly
different. The list was updated for each test to reflect the current
state.
2024-11-08 10:54:24 +01:00
Ondřej Surý
ef7aba7072
Remove OpenSSL Engine support
The OpenSSL 1.x Engines support has been deprecated in the OpenSSL 3.x
and is going to be removed.  Remove the OpenSSL Engine support in favor
of OpenSSL Providers.
2024-08-06 15:17:48 +02:00
Tom Krizek
fc84bf80e4
Replace testcrypto.sh invocations in tests
Use the provided environment variables instead.
2024-07-31 10:50:11 +02:00
Tom Krizek
b100ce4c88
Parse openssl-related vars in pytest
The openssl config needs to be parsed for some tests that use SoftHSM2.
Rewrite the parsing to python and ensure the required variables are
properly set test-wide.
2024-05-09 17:08:09 +02:00
Tom Krizek
d1f1b6a934
Mark the enginepkcs11 test as flaky
There are frequent intermittent failures due to "crypto failure".
2024-03-21 16:25:02 +01:00
Tom Krizek
3712a219cb
Re-enable enginepkcs11 system test
The condition in prereq.sh which attempts to match two string uses
integer equality operation. This results in an error, causing the
enginepkcs11 test to always be skipped. Use = operator for the string
comparison instead.
2024-03-21 16:25:00 +01:00
Matthijs Mekking
cb12b42839 Rename "uri" to "pkcs11-uri"
The name "uri" was considered to be too generic and could potentially
clash with a future URI configuration option. Renamed to "pkcs11-uri".

Note that this option name was also preferred over "pkcs11uri", the
dash is considered to be the more clearer form.
2024-01-25 15:37:40 +01:00
Matthijs Mekking
624034125f Add test case with special characters in zone name
Add a zone to the system test that has special characters to
ensure it does not mess up PKCS#11 labels when creating keys.
2024-01-25 15:37:40 +01:00
Matthijs Mekking
89cf3049d4 Test dnssec-policy/hsm with multiple views
Add test cases for zones in different views that are using PKCS#11
tokens to store its keys.

If it is using the same DNSSEC policy, only one PKCS#11 token should be
created and the same key should be used for the zone in both views.

If it is using a different DNSSEC policy, multiple PKCS#11 token should
be created and each view should use their respective key.
2024-01-25 15:37:40 +01:00
Matthijs Mekking
c59c2ac85f Minor fixes in enginepkcs11 system test
- Shell function body should be in between curly braces.
- Some erroneous '|| return 1' are replaced with '|| ret=1'.
- Fix a variable name (was 'ret', should be '_ret').
- Clean up when setting up a new test.
2024-01-25 15:37:40 +01:00
Matthijs Mekking
2e9fd6d0c1 Only run pkcs11engine test if pkcs11-provider is available
The bullseye and bookworm images are not set up with pkcs11-provider,
so we need to add an additional prerequisite for running the
pkcs11engine test. Check the path of OPENSSL_CONF.
2024-01-25 15:37:40 +01:00
Matthijs Mekking
4b5bba3a99 Test dnssec-policy with multiple key stores
Make sure that if a dnssec-policy uses multiple key stores, the keys
have the right attributes and are stored in their appropriate directory.
2024-01-25 14:47:44 +01:00
Matthijs Mekking
91f18c98b3 Add tests for key-store with engine_pkcs11
Add cases for each algorithm to test the interaction between
dnssec-policy and engine_pkcs11. Ensure that named creates keys on
startup.

Also test dnssec-keygen when using a dnssec-policy with a PKCS#11
based key-store.
2024-01-25 14:41:25 +01:00
Evan Hunt
90a16b3e65 fix unnecessary capitalization
there was a typo in the copyright header.
2023-12-06 17:31:38 -08:00
Tom Krizek
1e181cf61d
Remove -U 4 from system tests
This option doesn't appear to be needed for any of the tests, so remove
it to keep things simple.
2023-12-01 14:03:35 +01:00
Ondřej Surý
f8e264ba6d
Remove the lock-file configuration and -X argument to named
The lock-file configuration (both from configuration file and -X
argument to named) has better alternatives nowadays.  Modern process
supervisor should be used to ensure that a single named process is
running on a given configuration.

Alternatively, it's possible to wrap the named with flock(1).
2023-10-26 22:42:37 +02:00
Tom Krizek
4cb8b13987
Reformat shell scripts with shfmt
All changes in this commit were automated using the command:

  shfmt -w -i 2 -ci -bn . $(find . -name "*.sh.in")

By default, only *.sh and files without extension are checked, so
*.sh.in files have to be added additionally. (See mvdan/sh#944)
2023-10-26 10:23:50 +02:00
Timo Teräs
7fbcf38a3f Enable keyfromlabel and enginepkcs11 systemtests with pkcs11-provider
- Simplify configuration management by deducing SoftHSM module path
  from openssl config

- Determine the engine flag (-E) value from openssl config

- Drop unused/unneeded environment variables

- Run pkcs11-provider tests on Debian "sid" ossl3 flavor
2023-08-25 14:59:16 +03:00
Tom Krizek
01bc805f89
Run system tests with set -e
Ensure all shell system tests are executed with the errexit option set.
This prevents unchecked return codes from commands in the test from
interfering with the tests, since any failures need to be handled
explicitly.
2023-07-14 15:07:25 +02:00
Tom Krizek
2f5bf6d971
Add pytest functions for shell system tests
In order to run the shell system tests, the pytest runner has to pick
them up somehow. Adding an extra python file with a single function
for the shell tests for each system test proved to be the most
compatible way of running the shell tests across older pytest/xdist
versions.

Modify the legacy run.sh script to ignore these pytest-runner specific
glue files when executing tests written in pytest.
2023-05-22 14:11:39 +02:00
Tom Krizek
62eea511db
Rename engine_pkcs11 system test
In order to have a common naming convention for system tests, rename the
only outlier "engine_pkcs11" to "enginepkcs11", which was the only
system test using an underscore in its name.

The only allowed word separators for system test names are either dash
or no separator.
2022-12-21 13:40:10 +01:00