From 13173ec8a2d3fdc4150304aeb60937bb4ddf20df Mon Sep 17 00:00:00 2001 From: Herman Slatman Date: Sun, 1 May 2022 22:29:17 +0200 Subject: [PATCH] Fix SCEP GET requests --- scep/api/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scep/api/api.go b/scep/api/api.go index 31f0f10d..fcabfc58 100644 --- a/scep/api/api.go +++ b/scep/api/api.go @@ -86,7 +86,7 @@ func (h *handler) Get(w http.ResponseWriter, r *http.Request) { case opnGetCACaps: res, err = h.GetCACaps(ctx) case opnPKIOperation: - // TODO: implement the GET for PKI operation? Default CACAPS doesn't specify this is in use, though + res, err = h.PKIOperation(ctx, req) default: err = fmt.Errorf("unknown operation: %s", req.Operation) } @@ -151,8 +151,8 @@ func decodeRequest(r *http.Request) (request, error) { if _, ok := query["message"]; ok { message = query.Get("message") } - // TODO: verify this; it seems like it should be StdEncoding instead of URLEncoding - decodedMessage, err := base64.URLEncoding.DecodeString(message) + // TODO: verify this; right type of encoding? Needs additional transformations? + decodedMessage, err := base64.StdEncoding.DecodeString(message) if err != nil { return request{}, err }