From 05f6eccf27824549d711f30578eff2a39252c7a0 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Wed, 20 Nov 2019 00:30:46 -0500 Subject: update golang.org/x/crypto vendor to use acme v2 (#9056) --- vendor/golang.org/x/crypto/acme/http.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'vendor/golang.org/x/crypto/acme/http.go') diff --git a/vendor/golang.org/x/crypto/acme/http.go b/vendor/golang.org/x/crypto/acme/http.go index b145292f9e..c51943e71a 100644 --- a/vendor/golang.org/x/crypto/acme/http.go +++ b/vendor/golang.org/x/crypto/acme/http.go @@ -155,6 +155,14 @@ func (c *Client) get(ctx context.Context, url string, ok resOkay) (*http.Respons } } +// postAsGet is POST-as-GET, a replacement for GET in RFC8555 +// as described in https://tools.ietf.org/html/rfc8555#section-6.3. +// It makes a POST request in KID form with zero JWS payload. +// See nopayload doc comments in jws.go. +func (c *Client) postAsGet(ctx context.Context, url string, ok resOkay) (*http.Response, error) { + return c.post(ctx, nil, url, noPayload, ok) +} + // post issues a signed POST request in JWS format using the provided key // to the specified URL. If key is nil, c.Key is used instead. // It returns a non-error value only when ok reports true. @@ -200,7 +208,7 @@ func (c *Client) post(ctx context.Context, key crypto.Signer, url string, body i // If key argument is nil and c.accountKID returns a non-zero keyID, // the request is sent in KID form. Otherwise, JWK form is used. // -// In practice, when interfacing with RFC compliant CAs most requests are sent in KID form +// In practice, when interfacing with RFC-compliant CAs most requests are sent in KID form // and JWK is used only when KID is unavailable: new account endpoint and certificate // revocation requests authenticated by a cert key. // See jwsEncodeJSON for other details. -- cgit v1.2.3