Quentin Schulz
564c6682fa
tools: binman: fit: add tests for signing with an OpenSSL engine
...
This adds a test that signs a FIT and verifies the signature with
fit_check_sign.
OpenSSL engines are typically for signing with external HW so it's not
that straight-forward to simulate.
For a simple RSA OpenSSL engine, a dummy engine with a hardcoded RSA
4096 private key is made available. It can be selected by setting the
OpenSSL engine argument to dummy-rsa-engine. This can only be done if
the engine is detected by OpenSSL, which works by setting the
OPENSSL_ENGINES environment variable. I have no clue if dummy-rsa-engine
is properly implementing what is expected from an RSA engine, but it
seems to be enough for testing.
For a simple PKCS11 engine, SoftHSMv2 is used, which allows to do PKCS11
without specific hardware. The keypairs and tokens are generated on the
fly. The "prod" token is generated with a different PIN (1234 instead of
1111) to also test MKIMAGE_SIGN_PIN env variable while we're at it.
Binman will not mess with the local SoftHSMv2 setup as it will only use
tokens from a per-test temporary directory enforced via the temporary
configuration file set via SOFTHSM2_CONF env variable in the tests. The
files created in the input dir should NOT be named the same as it is
shared between all tests in the same process (which is all tests when
running binman with -P 1 or with -T).
Once signed, it's checked with fit_check_sign with the associated
certificate.
Finally, a new softhsm2_util bintool is added so that we can initialize
the token and import keypairs. On Debian, the package also brings
libsofthsm2 which is required for OpenSSL to interact with SoftHSMv2. It
is not the only package required though, as it also needs p11-kit and
libengine-pkcs11-openssl (the latter bringing the former). We can detect
if it's properly installed by running openssl engine dynamic -c pkcs11.
If that fails, we simply skip the test.
The package is installed in the CI container by default.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-12-06 11:43:08 -06:00
..
2024-07-29 08:42:18 -06:00
2018-09-29 11:49:35 -06:00
2022-06-28 03:09:52 +01:00
2024-01-18 17:50:27 -05:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2023-01-26 10:47:45 -07:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2022-06-28 03:09:52 +01:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2022-06-28 03:09:52 +01:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2022-06-28 03:09:52 +01:00
2022-06-28 03:09:52 +01:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2019-10-15 08:40:02 -06:00
2018-10-09 04:40:27 -06:00
2019-10-15 08:40:02 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2022-06-28 03:09:52 +01:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2019-07-23 20:27:57 -07:00
2023-03-08 11:38:48 -08:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2019-10-15 08:40:02 -06:00
2022-09-12 06:41:14 -06:00
2018-10-09 04:40:27 -06:00
2021-01-30 14:25:41 -07:00
2020-10-29 14:42:59 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2022-03-18 19:24:25 -06:00
2022-03-18 19:24:25 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2018-10-09 04:40:27 -06:00
2021-04-29 03:23:39 -07:00
2019-07-23 20:27:58 -07:00
2018-10-09 04:40:27 -06:00
2019-10-15 08:40:02 -06:00
2018-10-09 04:40:27 -06:00
2018-10-22 13:57:12 -04:00
2019-05-08 12:44:07 +08:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2022-03-18 19:24:25 -06:00
2022-03-18 19:24:25 -06:00
2022-03-18 19:24:25 -06:00
2019-07-24 12:54:08 -07:00
2019-07-24 12:54:08 -07:00
2019-07-24 12:54:08 -07:00
2019-07-24 12:54:08 -07:00
2019-07-24 12:54:08 -07:00
2019-07-24 12:54:08 -07:00
2019-07-24 12:54:08 -07:00
2019-07-24 12:54:08 -07:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-07-29 09:38:06 -06:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2022-06-28 03:09:52 +01:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2019-10-15 08:40:02 -06:00
2019-11-02 18:00:51 +08:00
2019-11-02 18:00:51 +08:00
2022-06-28 03:09:52 +01:00
2020-07-24 19:25:15 -06:00
2020-07-25 14:46:57 -06:00
2020-07-25 14:46:57 -06:00
2020-07-25 14:46:57 -06:00
2020-07-25 14:46:57 -06:00
2020-07-25 14:46:57 -06:00
2022-01-25 12:36:10 -07:00
2020-07-26 19:59:57 -06:00
2020-07-26 19:59:57 -06:00
2020-09-22 12:50:43 -06:00
2020-09-22 12:50:43 -06:00
2020-09-22 12:50:43 -06:00
2020-09-22 12:54:13 -06:00
2020-09-22 12:50:43 -06:00
2025-06-26 08:12:54 -06:00
2020-09-22 12:50:43 -06:00
2020-10-22 11:43:43 +05:30
2020-09-25 11:27:28 +08:00
2020-09-25 11:27:28 +08:00
2020-09-25 11:27:28 +08:00
2020-09-25 11:27:28 +08:00
2020-10-29 14:42:59 -06:00
2020-10-29 14:42:59 -06:00
2020-10-29 14:42:59 -06:00
2020-10-29 14:42:59 -06:00
2020-10-29 14:42:59 -06:00
2020-10-29 14:42:59 -06:00
2020-10-29 14:42:59 -06:00
2025-04-11 14:29:52 -06:00
2020-10-29 14:42:59 -06:00
2020-10-29 14:42:59 -06:00
2022-06-28 03:09:52 +01:00
2021-01-30 14:25:41 -07:00
2021-01-30 14:25:41 -07:00
2021-01-30 14:25:41 -07:00
2021-01-30 14:25:41 -07:00
2021-03-26 17:03:09 +13:00
2021-03-26 17:03:09 +13:00
2021-03-26 17:03:09 +13:00
2021-03-26 17:03:09 +13:00
2021-03-27 16:26:48 +13:00
2021-03-27 16:26:48 +13:00
2021-03-27 16:26:48 +13:00
2021-03-27 16:26:48 +13:00
2021-03-27 16:26:48 +13:00
2021-05-19 17:01:49 +08:00
2021-07-21 10:27:35 -06:00
2021-12-17 09:44:59 -07:00
2021-12-17 09:44:59 -07:00
2021-12-17 09:44:59 -07:00
2021-12-17 09:44:59 -07:00
2021-12-17 09:44:59 -07:00
2021-12-17 09:44:59 -07:00
2021-12-17 09:44:59 -07:00
2021-12-17 09:44:59 -07:00
2021-12-17 09:44:59 -07:00
2021-12-17 09:44:59 -07:00
2021-12-05 09:22:41 -07:00
2021-12-05 09:22:41 -07:00
2021-12-05 09:23:15 -07:00
2021-12-05 09:23:15 -07:00
2022-01-12 21:26:59 -05:00
2022-01-25 12:36:11 -07:00
2022-01-30 20:40:58 -07:00
2025-06-26 08:12:54 -06:00
2022-02-22 10:05:44 -07:00
2022-02-22 10:05:44 -07:00
2025-06-26 08:12:54 -06:00
2022-03-18 19:24:25 -06:00
2022-03-18 19:24:25 -06:00
2023-12-13 18:39:06 -05:00
2023-01-26 10:47:45 -07:00
2022-03-18 19:24:25 -06:00
2022-03-18 19:24:25 -06:00
2022-03-18 19:24:25 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-08-26 16:33:48 -06:00
2022-09-04 20:00:39 +08:00
2022-09-04 20:00:39 +08:00
2022-09-04 20:00:39 +08:00
2022-09-12 06:41:14 -06:00
2022-09-12 06:41:14 -06:00
2022-09-12 06:41:14 -06:00
2022-09-12 06:41:14 -06:00
2022-10-29 07:36:33 -06:00
2022-10-31 11:02:44 -04:00
2023-01-18 11:50:01 -07:00
2023-01-18 11:50:01 -07:00
2023-01-18 11:50:01 -07:00
2023-08-02 12:05:57 -06:00
2023-01-18 11:50:01 -07:00
2023-01-18 11:50:01 -07:00
2023-01-18 14:55:40 -07:00
2023-01-18 14:55:40 -07:00
2023-01-18 14:55:41 -07:00
2023-01-18 14:55:41 -07:00
2023-01-18 14:55:41 -07:00
2023-01-18 14:55:41 -07:00
2023-01-18 14:55:41 -07:00
2023-01-18 14:55:41 -07:00
2023-01-26 10:47:45 -07:00
2023-01-26 10:47:45 -07:00
2023-03-08 13:15:14 -08:00
2023-03-08 13:15:14 -08:00
2023-03-08 13:15:15 -08:00
2023-03-14 16:08:52 -06:00
2023-03-14 16:08:52 -06:00
2023-07-20 14:10:58 -06:00
2023-07-20 14:10:58 -06:00
2025-06-26 08:12:54 -06:00
2023-07-20 14:10:58 -06:00
2023-07-20 14:10:58 -06:00
2023-07-20 14:10:58 -06:00
2023-07-20 14:10:58 -06:00
2023-07-20 14:10:58 -06:00
2023-07-20 14:10:58 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-11-02 22:38:01 -04:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:33:55 -06:00
2023-07-24 09:34:10 -06:00
2023-07-24 09:34:10 -06:00
2023-07-24 09:34:10 -06:00
2023-07-24 09:34:10 -06:00
2023-07-24 09:34:10 -06:00
2023-07-24 09:34:10 -06:00
2023-08-05 11:38:59 -06:00
2023-08-05 11:38:59 -06:00
2023-08-05 11:31:59 -06:00
2023-08-05 11:31:59 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2023-10-13 14:01:42 -06:00
2024-01-18 17:50:27 -05:00
2024-01-04 16:48:00 -05:00
2024-01-04 16:48:00 -05:00
2024-07-03 07:36:33 +01:00
2024-07-03 07:36:33 +01:00
2024-07-29 08:42:18 -06:00
2024-07-29 08:42:18 -06:00
2024-07-29 08:42:18 -06:00
2024-07-29 08:42:18 -06:00
2024-07-29 08:42:18 -06:00
2025-06-26 08:12:54 -06:00
2025-06-26 08:12:54 -06:00
2025-06-26 08:12:54 -06:00
2024-09-26 12:40:30 +02:00
2024-09-26 12:40:30 +02:00
2024-09-26 12:40:30 +02:00
2024-09-26 12:40:31 +02:00
2025-12-06 11:43:08 -06:00
2025-12-06 11:43:08 -06:00
2025-12-06 11:43:08 -06:00
2025-12-06 11:43:08 -06:00
2025-12-06 11:43:08 -06:00
2024-10-18 14:10:22 -06:00
2025-12-06 11:43:08 -06:00
2024-10-18 14:10:22 -06:00
2025-12-06 11:43:08 -06:00
2024-10-18 14:10:22 -06:00
2024-10-18 14:10:22 -06:00
2024-12-19 09:10:34 -06:00
2024-12-19 09:10:34 -06:00
2025-06-26 08:12:54 -06:00
2025-05-03 16:55:32 -03:00
2025-04-03 11:37:45 -06:00
2025-06-12 13:22:23 -06:00
2025-06-26 11:48:37 -06:00
2025-07-01 10:52:01 -06:00
2025-07-01 10:52:01 -06:00
2025-07-10 19:26:56 +02:00
2025-07-10 19:26:56 +02:00
2025-09-17 08:16:04 -03:00
2024-12-19 09:10:34 -06:00
2023-04-28 11:30:17 -06:00
2023-01-18 14:55:41 -07:00
2023-07-20 14:10:58 -06:00
2023-07-20 14:10:58 -06:00
2023-07-20 14:10:58 -06:00
2018-05-07 09:34:12 -04:00
2023-07-24 09:33:55 -06:00
2025-12-06 11:43:08 -06:00
2022-02-22 10:05:44 -07:00
2022-02-22 10:05:44 -07:00
2023-01-26 10:47:45 -07:00
2023-07-20 14:10:58 -06:00
2019-07-24 12:53:46 -07:00
2019-07-24 12:53:46 -07:00
2023-03-08 13:15:15 -08:00
2023-03-08 13:15:15 -08:00
2025-12-06 11:43:08 -06:00
2021-11-13 08:16:39 -07:00
2021-11-13 08:16:39 -07:00
2021-11-13 08:16:39 -07:00
2017-12-12 19:53:45 -07:00
2018-05-07 09:34:12 -04:00
2023-04-28 11:30:17 -06:00
2019-11-11 14:20:35 -05:00
2019-11-11 14:20:35 -05:00
2023-04-28 11:30:17 -06:00
2019-11-02 18:00:51 +08:00
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2019-10-15 08:40:02 -06:00