From 40d6f6b5eee9d7bb5e29663eddbf659ca0818a73 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 11 Jun 2020 18:31:33 +0000 Subject: [PATCH] tests: Add a pre-signed-pull.sh test I'm thinking about adding an implementation of ed25519 signatures with OpenSSL (so we can ship the feature with Fedora CoreOS without requiring an additional library) and in preparation for that it's essential that we validate that libsodium-generated signatures and OpenSSL-generated signatures are compatible. I don't know if they are yet actually, but the goal of this new test is to add a pre-generated repository with a signed commit generated by libsodium. This will catch if e.g. there's ever a change in libsodium, or if existing libsodium implementation versions (e.g. the one in Debian) might differ from what we ship here. --- Makefile-tests.am | 2 ++ tests/pre-signed-pull-data.tar.gz | Bin 0 -> 1633 bytes tests/test-pre-signed-pull.sh | 52 ++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 tests/pre-signed-pull-data.tar.gz create mode 100755 tests/test-pre-signed-pull.sh diff --git a/Makefile-tests.am b/Makefile-tests.am index 411c5628..a4179377 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -140,6 +140,7 @@ _installed_or_uninstalled_test_scripts = \ tests/test-config.sh \ tests/test-signed-commit.sh \ tests/test-signed-pull.sh \ + tests/test-pre-signed-pull.sh \ tests/test-signed-pull-summary.sh \ $(NULL) @@ -201,6 +202,7 @@ dist_installed_test_data = tests/archive-test.sh \ tests/fah-deltadata-old.tar.xz \ tests/fah-deltadata-new.tar.xz \ tests/ostree-path-traverse.tar.gz \ + tests/pre-signed-pull-data.tar.gz \ tests/libtest-core.sh \ $(NULL) diff --git a/tests/pre-signed-pull-data.tar.gz b/tests/pre-signed-pull-data.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..53a6019abe143c497b27519406b328f0d8343505 GIT binary patch literal 1633 zcmV-n2A=sJiwFP!000001MQo8XdFcx#}7r&>qDaj@dblmX@zWNW@jHKL~Wa#nx?6F zTxwgb%K{6n zTr>~mNbGK+&WD5DyWN}L?tb_8o!`veY8{2lffCCw8cSpuaPD%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