-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show verification instructions for sigstore py module too
Refs #549
- Loading branch information
1 parent
5b3a951
commit 111a6df
Showing
3 changed files
with
27 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,32 +108,36 @@ Github `source releases <https://github.com/rogerbinns/apsw/releases>`__ are | |
digitally signed so you can verify they have not been tampered with, | ||
and were produced by the project maintainer. | ||
|
||
`Sigstore <https://www.sigstore.dev/>`__ is used via the `cosign tool | ||
<https://docs.sigstore.dev/cosign/signing/>`__. Download the | ||
corresponding cosign bundle which contains the signature. | ||
`Sigstore <https://www.sigstore.dev/>`__ is used. Instructions are | ||
shown for the standalone `cosign tool | ||
<https://github.com/sigstore/cosign/releases>`__ (easiest, | ||
recommended), and the `Python sigstore module | ||
<https://pypi.org/project/sigstore/>`__. | ||
|
||
Verify | ||
|
||
`Install cosign | ||
<https://docs.sigstore.dev/cosign/system_config/installation/>`__ if you | ||
don't have it already. It is `available for a wide variety of | ||
platforms <https://github.com/sigstore/cosign/releases/>`__ | ||
including Linux, MacOS, and Windows. | ||
|
||
Checking the signature needs to provide the source release, the | ||
cosign bundle, the maintainer id, and issuer. The command is all | ||
one line shown here across multiple lines for clarity. | ||
one line shown here across multiple lines for clarity, along with | ||
the expected successful output. | ||
|
||
.. verify-begin | ||
.. code-block:: console | ||
$ cosign verify-blob apsw-3.47.2.0.zip \ | ||
--bundle apsw-3.47.2.0.zip.cosign-bundle \ | ||
[email protected] \ | ||
$ cosign verify-blob apsw-3.47.2.0.zip \ | ||
--new-bundle-format \ | ||
--bundle apsw-3.47.2.0.zip.cosign-bundle \ | ||
[email protected] \ | ||
--certificate-oidc-issuer=https://github.com/login/oauth | ||
Verified OK | ||
$ python3 -m sigstore verify identity apsw-3.47.2.0.zip \ | ||
--bundle apsw-3.47.2.0.zip.cosign-bundle \ | ||
[email protected] \ | ||
--cert-oidc-issuer=https://github.com/login/oauth | ||
OK: apsw-3.47.2.0.zip | ||
.. verify-end | ||
Check for a success exit code, and verified message. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,14 +51,22 @@ | |
op.append("") | ||
|
||
def back(s): | ||
return s + " " * (65 - len(s)) + "\\" | ||
return s + " " * (62 - len(s)) + "\\" | ||
|
||
op.append(" " + back(f"$ cosign verify-blob apsw-{version}.zip")) | ||
op.append(" " + back(" --new-bundle-format")) | ||
op.append(" " + back(f" --bundle apsw-{version}.zip.cosign-bundle")) | ||
op.append(" " + back(" [email protected]")) | ||
op.append(" " + " --certificate-oidc-issuer=https://github.com/login/oauth") | ||
op.append(" " + "Verified OK") | ||
op.append("") | ||
op.append(" " + back(f"$ python3 -m sigstore verify identity apsw-{version}.zip")) | ||
op.append(" " + back(f" --bundle apsw-{version}.zip.cosign-bundle")) | ||
op.append(" " + back(" [email protected]")) | ||
op.append(" " + " --cert-oidc-issuer=https://github.com/login/oauth") | ||
op.append(" " + f"OK: apsw-{version}.zip") | ||
|
||
op.append("") | ||
if line == ".. downloads-end": | ||
indownload = False | ||
if line == " .. verify-end": | ||
|