Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for attaching cert and cert chain in attach command Git… #2602

Merged
merged 13 commits into from
Feb 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed trailing white spaces
Signed-off-by: Mukul Sharma (Nokia) <mukul.sharma@nokia.com>
  • Loading branch information
MukulSharma77 committed Feb 10, 2023
commit 3ffa1109a59afc5085c3767dfddb5188309e7f1f
10 changes: 5 additions & 5 deletions test/e2e_test_attach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cp ./test/testdata/test_attach_private_key $tmp/private_key
cp ./test/testdata/test_attach_leafcert.pem $tmp/leafcert.pem
cp ./test/testdata/test_attach_certchain.pem $tmp/certchain.pem
cp ./test/testdata/test_attach_rootcert.pem $tmp/rootcert.pem

pushd $tmp

pass="$RANDOM"
Expand All @@ -43,10 +43,10 @@ IMAGE_URI_DIGEST=$IMAGE_URI@$SRC_DIGEST
# `initialize`
./cosign initialize

## Generate
## Generate
./cosign generate $IMAGE_URI_DIGEST > payload.json

## Sign with Leafcert Private Key
## Sign with Leafcert Private Key
openssl dgst -sha256 -sign ./private_key -out payload.sig payload.json
cat payload.sig | base64 > payloadbase64.sig

Expand All @@ -59,8 +59,8 @@ echo "Payload: $PAYLOAD"



## Attach Signature, payload, cert and cert-chain
./cosign attach signature --signature ./payloadbase64.sig --payload ./payload.json --cert ./leafcert.pem --cert-chain ./certchain.pem $IMAGE_URI_DIGEST
## Attach Signature, payload, cert and cert-chain
./cosign attach signature --signature ./payloadbase64.sig --payload ./payload.json --cert ./leafcert.pem --cert-chain ./certchain.pem $IMAGE_URI_DIGEST


## confirm manifest conatins annotation for cert and cert chain
Expand Down