Created
August 19, 2021 16:56
-
-
Save dlorenc/919210e3e5531c50b573467b8c252533 to your computer and use it in GitHub Desktop.
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
$ openssl ecparam -name prime256v1 -genkey -noout -out openssl.key | |
$ openssl ec -in openssl.key -pubout -out openssl.pub | |
$ cosign generate us.gcr.io/dlorenc-vmtest2/demo > payload.json | |
$ openssl dgst -sha256 -sign openssl.key -out payload.sig payload.json | |
$ cat payload.sig | base64 > payloadbase64.sig | |
$ cosign attach signature -payload payload.json -signature payloadbase64.sig us.gcr.io/dlorenc-vmtest2/demo | |
$ cosign verify -key openssl.pub us.gcr.io/dlorenc-vmtest2/demo | |
Verification for us.gcr.io/dlorenc-vmtest2/demo -- | |
The following checks were performed on each of these signatures: | |
- The cosign claims were validated | |
- The signatures were verified against the specified public key | |
- Any certificates were verified against the Fulcio roots. | |
{"critical":{"identity":{"docker-reference":"us.gcr.io/dlorenc-vmtest2/demo"},"image":{"docker-manifest-digest":"sha256:124e1fdee94fe5c5f902bc94da2d6e2fea243934c74e76c2368acdc8d3ac7155"},"type":"cosign container image signature"},"optional":null} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment