summaryrefslogtreecommitdiff
path: root/tests/test-commit-sign.sh
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2021-04-12 18:42:05 -0400
committerColin Walters <walters@verbum.org>2021-08-30 13:27:38 -0400
commit359435de843ce2a1e94941c24ec4ddd7d5a7bccb (patch)
treee1d745d1575c30526c7d5074a285703fe720bc45 /tests/test-commit-sign.sh
parent30909a28f2aff54b615837a184f53509cbccc381 (diff)
downloadostree-359435de843ce2a1e94941c24ec4ddd7d5a7bccb.tar.gz
Add an API to verify a commit signature explicitly
We have a bunch of APIs to do GPG verification of a commit, but that doesn't generalize to signapi. Further, they require the caller to check the signature status explicitly which seems like a trap. This much higher level API works with both GPG and signapi. The intention is to use this in things that are doing "external pulls" like the ostree-ext tar import support. There we will get the commitmeta from the tarball and we want to verify it at the same time we import the commit.
Diffstat (limited to 'tests/test-commit-sign.sh')
-rwxr-xr-xtests/test-commit-sign.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh
index e9e7a6da..c3f9ce63 100755
--- a/tests/test-commit-sign.sh
+++ b/tests/test-commit-sign.sh
@@ -28,7 +28,7 @@ if ! has_gpgme; then
exit 0
fi
-echo "1..6"
+echo "1..7"
keyid="472CDAFA"
oldpwd=`pwd`
@@ -85,9 +85,15 @@ ${CMD_PREFIX} ostree --repo=repo remote add origin $(cat httpd-address)/ostree/g
${CMD_PREFIX} ostree --repo=repo pull origin main
${CMD_PREFIX} ostree --repo=repo show --gpg-verify-remote=origin main > show.txt
assert_file_has_content_literal show.txt 'Found 1 signature'
-rm repo -rf
echo "ok pull verify"
+# Run tests written in C
+${OSTREE_UNINSTALLED}/tests/test-commit-sign-sh-ext
+echo "ok extra C tests"
+
+# Clean things up and reinit
+rm repo -rf
+
# A test with corrupted detached signature
cd ${test_tmpdir}
find ${test_tmpdir}/ostree-srv/gnomerepo -name '*.commitmeta' | while read fname; do