summaryrefslogtreecommitdiff
path: root/tests/test-pull-summary-sigs.sh
diff options
context:
space:
mode:
authorDan Nicholson <nicholson@endlessm.com>2019-06-15 09:56:44 -0500
committerDan Nicholson <nicholson@endlessm.com>2020-01-24 13:02:17 -0700
commit0fbfc0b2079f32b919ae6b804bda40332e03b618 (patch)
treeb1d4eb254f500dcbd14a948b6b231748e1f6363d /tests/test-pull-summary-sigs.sh
parent2c24f28ce45fe9c416650f004e30bcb97c76e0f0 (diff)
downloadostree-0fbfc0b2079f32b919ae6b804bda40332e03b618.tar.gz
lib/gpg: Add more specific OstreeGpgError codes
Currently `ostree_gpg_verify_result_require_valid_signature` always returns an error that the key used for the signature is missing from the keyring. However, all that's been determined is that there are no valid signatures. The error could also be from an expired signature, an expired key, a revoked key or an invalid signature. Provide values for these missing errors and return them from `ostree_gpg_verify_result_require_valid_signature`. The description of each result is appended to the error message, but since the result can contain more than one signature but only a single error can be returned, the status of the last signature is used for the error code. See the comment for rationale. Related: flatpak/flatpak#1450
Diffstat (limited to 'tests/test-pull-summary-sigs.sh')
-rwxr-xr-xtests/test-pull-summary-sigs.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-pull-summary-sigs.sh b/tests/test-pull-summary-sigs.sh
index 821ae953..401e88c9 100755
--- a/tests/test-pull-summary-sigs.sh
+++ b/tests/test-pull-summary-sigs.sh
@@ -189,7 +189,7 @@ cp ${test_tmpdir}/ostree-srv/gnomerepo/summary.sig{.2,}
if ${OSTREE} --repo=repo pull origin main 2>err.txt; then
assert_not_reached "Successful pull with old summary"
fi
-assert_file_has_content err.txt "none are in trusted keyring"
+assert_file_has_content err.txt "BAD signature"
assert_has_file repo/tmp/cache/summaries/origin
assert_has_file repo/tmp/cache/summaries/origin.sig
cmp repo/tmp/cache/summaries/origin ${test_tmpdir}/ostree-srv/gnomerepo/summary.1 >&2