diff options
author | Julio Capote <jcapote@gmail.com> | 2023-01-05 16:33:43 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2023-01-05 16:33:43 +0000 |
commit | 1fc55f43cb2065f45a006e4ef6dd2dfc57ec4d00 (patch) | |
tree | de35b3bea966f4d2fbc3ededf8eeee46c0270255 | |
parent | 1a4c03bf249fc1249eb361bc58126c9066137b72 (diff) | |
download | communique-1fc55f43cb2065f45a006e4ef6dd2dfc57ec4d00.tar.gz |
digest required
Diffstat (limited to '')
-rw-r--r-- | registry/registry.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/registry/registry.go b/registry/registry.go index a2be06e..475464f 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -276,7 +276,7 @@ func (r *Registry) deliverAcceptToInbox(url, actorUrl *url.URL, follow vocab.Act prefs := []httpsig.Algorithm{httpsig.RSA_SHA256} digestAlgorithm := httpsig.DigestSha256 // The "Date" and "Digest" headers must already be set on r, as well as r.URL. - headersToSign := []string{httpsig.RequestTarget, "host", "date", "content-type"} + headersToSign := []string{httpsig.RequestTarget, "host", "date", "digest", "content-type"} signer, _, err := httpsig.NewSigner(prefs, digestAlgorithm, headersToSign, httpsig.Signature, 0) if err != nil { return err @@ -285,7 +285,7 @@ func (r *Registry) deliverAcceptToInbox(url, actorUrl *url.URL, follow vocab.Act // ...but it is optional, no digest will be signed if given "nil" // body := nil // If r were a http.ResponseWriter, call SignResponse instead. - err = signer.SignRequest(privKey, actorUrl.String(), request, nil) + err = signer.SignRequest(privKey, actorUrl.String(), request, jsonData) r.mu.Unlock() r.log.With( |