From 47a0939b098be456cafc41e0988a39a09e611c53 Mon Sep 17 00:00:00 2001 From: Dan Lorenc Date: Mon, 20 Dec 2021 20:01:26 -0600 Subject: [PATCH] Fix the SCT header return value from the API to base64 encode it. I don't actually know what's correct here - but the current client expects it to be base64 encoded. We could keep it "raw", but then we have to fix the client that's currently in cosign. Signed-off-by: Dan Lorenc --- pkg/api/ca.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/ca.go b/pkg/api/ca.go index 58d2cfe4a..00e19455d 100644 --- a/pkg/api/ca.go +++ b/pkg/api/ca.go @@ -203,7 +203,7 @@ func signingCert(w http.ResponseWriter, req *http.Request) { } // Set the SCT and Content-Type headers, and then respond with a 201 Created. - w.Header().Add("SCT", string(sctBytes)) + w.Header().Add("SCT", base64.StdEncoding.EncodeToString(sctBytes)) w.Header().Add("Content-Type", "application/pem-certificate-chain") w.WriteHeader(http.StatusCreated) // Write the PEM encoded certificate chain to the response body.