From 09d5b475afdb19000203ec090b8077b7cfc4eb44 Mon Sep 17 00:00:00 2001 From: Denis Pynkin Date: Fri, 31 Jan 2020 13:00:59 +0300 Subject: [PATCH] tests/sign: added check with file and single key on pull Additional test of signatures check behavior during the pull with keys file containing wrong signatures and correct verification key. Both are set as a part of remote's configuration. Signed-off-by: Denis Pynkin --- tests/test-signed-pull.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test-signed-pull.sh b/tests/test-signed-pull.sh index 4d8d7aab..e9d1bd75 100755 --- a/tests/test-signed-pull.sh +++ b/tests/test-signed-pull.sh @@ -23,7 +23,7 @@ set -euo pipefail . $(dirname $0)/libtest.sh -echo "1..6" +echo "1..8" setup_fake_remote_repo1 "archive" @@ -73,6 +73,8 @@ test_signed_pull "dummy" "" if ! has_libsodium; then echo "ok ed25519-key pull signed commit # SKIP due libsodium unavailability" echo "ok ed25519-key re-pull signature for stored commit # SKIP due libsodium unavailability" + echo "ok ed25519-key+file pull signed commit # SKIP due libsodium unavailability" + echo "ok ed25519-key+file re-pull signature for stored commit # SKIP due libsodium unavailability" echo "ok ed25519-file pull signed commit # SKIP due libsodium unavailability" echo "ok ed25519-file re-pull signature for stored commit # SKIP due libsodium unavailability" exit 0 @@ -98,6 +100,11 @@ for((i=0;i<100;i++)); do # Generate a list with some public signatures gen_ed25519_random_public done > ${PUBKEYS} + +# Test case with the file containing incorrect signatures and with the correct key set +${CMD_PREFIX} ostree --repo=repo config set 'remote "origin"'.verification-file "${PUBKEYS}" +test_signed_pull "ed25519" "key+file" + # Add correct key into the list echo ${PUBLIC} >> ${PUBKEYS}