summaryrefslogtreecommitdiffstatshomepage
path: root/posts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--posts/verify-with-signify.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/posts/verify-with-signify.md b/posts/verify-with-signify.md
index 5103ccc..0fd22c4 100644
--- a/posts/verify-with-signify.md
+++ b/posts/verify-with-signify.md
@@ -56,4 +56,30 @@ the `sha256sum` tool to only verify the integrity of the download:
$ tail -n1 <snapshot>.asc | sha256sum -c
<snapshot>: OK
+### Verification of the corresponding commit
+
+Every tarball hosted here contains its corresponding commit ID in the global
+extended pax header[^2]. Therefore, if a tarball is signed, it may be used to verify
+a commit and all of its ancestors.
+
+To do so, place the tarball in the cloned git repository first. If you already
+have the detached signature, you may verify the tarball normally like shown
+above. Otherwise, you can fetch the signatures directly from the repository:
+
+ $ git fetch origin refs/notes/signatures/tar.gz:refs/notes/signatures/tar.gz
+
+Now you can verify the tarball like so:
+
+ $ git notes --ref=signatures/tar.gz show <version> | signify -Cp release.pub -x -
+ Signature Verified
+ <snapshot>: OK
+
+Once verified, you can extract the commit using
+[`git-get-tar-commit-id(1)`](https://git-scm.com/docs/git-get-tar-commit-id) and
+show it:
+
+ $ gzip -d -c <snapshot> | git get-tar-commit-id | xargs git show
+
[^1]: If you are interested in how this is put together, check out [this](signify-cgit) post.
+[^2]: [`git-archive(1)`](https://git-scm.com/docs/git-archive#_description) puts
+ it there.