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

Add end-to-end testing for PKCS11 token signing #3343

Closed
haydentherapper opened this issue Nov 6, 2023 · 3 comments · Fixed by #3495
Closed

Add end-to-end testing for PKCS11 token signing #3343

haydentherapper opened this issue Nov 6, 2023 · 3 comments · Fixed by #3495
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@haydentherapper
Copy link
Contributor

Description

Right now, the GitHub Actions tests do not run tests for PKCS11 signing. See #3334 (comment) for how we might go about adding this.

@viveksahu26
Copy link
Contributor

/assign

@viveksahu26
Copy link
Contributor

Manually on running below commands, the e2e test for softhsm and pkcs11 works:

sudo docker run -dit --name softhsm4 -p 2348:2345 vegardit/softhsm2-pkcs11-proxy

cd $HOME
apk update
# add git
apk add git
# clone cosign
git clone https://github.com/sigstore/cosign.git
# cd to cosign
cd cosign/
# add make pcsc-lite-libs go command
apk add make build-base go
# test
softhsm2-util --init-token --free --label "My Token" --pin 1234 --so-pin 1234
go test -v -cover -coverprofile=./cover.out -tags=softhsm,pkcs11key -coverpkg github.com/sigstore/cosign/v2/pkg/cosign/pkcs11key test/pkcs11_test.go

Now to automate this, hey @haydentherapper I need a help, after running a container I want to run all those command automatically inside container. Currently when I run the above script, the containers run but command doesn't run inside the container, instead command runs after container gets exit, which makes no sense.

@viveksahu26
Copy link
Contributor

Finally resolve the automation issue, now it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants