summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/crypto/acme/http.go
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2019-11-20 00:30:46 -0500
committerGitHub <noreply@github.com>2019-11-20 00:30:46 -0500
commit05f6eccf27824549d711f30578eff2a39252c7a0 (patch)
treeb3c40cf1d49c0c8e4f0e6b2c1276c3afcec85f6f /vendor/golang.org/x/crypto/acme/http.go
parent108bed202349532d22f55c51a794ad48ae662e17 (diff)
downloadgitea-05f6eccf27824549d711f30578eff2a39252c7a0.tar.gz
gitea-05f6eccf27824549d711f30578eff2a39252c7a0.zip
update golang.org/x/crypto vendor to use acme v2 (#9056)
Diffstat (limited to 'vendor/golang.org/x/crypto/acme/http.go')
-rw-r--r--vendor/golang.org/x/crypto/acme/http.go10
1 files changed, 9 insertions, 1 deletions
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.