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 RootCert method to client + tests #290

Merged
merged 1 commit into from
Dec 21, 2021
Merged

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented Dec 21, 2021

Signed-off-by: Ville Aikas vaikas@chainguard.dev

Summary

Ticket Link

Fixes

Release Note

API Additions: Add RootCert method into the pkg/api/client

* Add tests for exercising STL
* Fix sigstore#289
* Validates that the new STL tests failed unless backporting sigstore#288

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@@ -112,6 +118,9 @@ func (c *client) SigningCert(cr CertificateRequest, token string) (*CertificateR

// Split the cert and the chain
certBlock, chainPem := pem.Decode(body)
if certBlock == nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, since Decode returns nil for certBlock if it can't find a PEM, I added this check since it certainly seemed like it must return a cert or it should be considered a failure?

@vaikas vaikas changed the title * Add RootCert method to client + tests Add RootCert method to client + tests Dec 21, 2021
@dlorenc dlorenc merged commit cdbc88b into sigstore:main Dec 21, 2021
@vaikas vaikas deleted the client-for-278 branch December 22, 2021 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the new RootCert this to the client and api_test.go as well.
2 participants