From 2e1524ec2f9e701dea190204f88261ba7e28ee3c Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Thu, 15 Apr 2021 17:54:22 -0700 Subject: [PATCH] Remove the creation on nonce on get acme directory. According to RFC 8555, the replay nonces are only required in POST requests. And of course in the new-nonce request. --- acme/api/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acme/api/handler.go b/acme/api/handler.go index c1d2d62a..2a6d3a02 100644 --- a/acme/api/handler.go +++ b/acme/api/handler.go @@ -91,8 +91,8 @@ func (h *Handler) Route(r api.Router) { // Standard ACME API r.MethodFunc("GET", getPath(NewNonceLinkType, "{provisionerID}"), h.baseURLFromRequest(h.lookupProvisioner(h.addNonce(h.addDirLink(h.GetNonce))))) r.MethodFunc("HEAD", getPath(NewNonceLinkType, "{provisionerID}"), h.baseURLFromRequest(h.lookupProvisioner(h.addNonce(h.addDirLink(h.GetNonce))))) - r.MethodFunc("GET", getPath(DirectoryLinkType, "{provisionerID}"), h.baseURLFromRequest(h.lookupProvisioner(h.addNonce(h.GetDirectory)))) - r.MethodFunc("HEAD", getPath(DirectoryLinkType, "{provisionerID}"), h.baseURLFromRequest(h.lookupProvisioner(h.addNonce(h.GetDirectory)))) + r.MethodFunc("GET", getPath(DirectoryLinkType, "{provisionerID}"), h.baseURLFromRequest(h.lookupProvisioner(h.GetDirectory))) + r.MethodFunc("HEAD", getPath(DirectoryLinkType, "{provisionerID}"), h.baseURLFromRequest(h.lookupProvisioner(h.GetDirectory))) extractPayloadByJWK := func(next nextHTTP) nextHTTP { return h.baseURLFromRequest(h.lookupProvisioner(h.addNonce(h.addDirLink(h.verifyContentType(h.parseJWS(h.validateJWS(h.extractJWK(h.verifyAndExtractJWSPayload(next)))))))))