aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.go b/main.go
index 9e34264..dd6e25a 100644
--- a/main.go
+++ b/main.go
@@ -1769,10 +1769,11 @@ func MakeActivityRequestOutbox(db *sql.DB, activity Activity) {
sig := fmt.Sprintf("(request-target): %s %s\\nhost: %s\\ndate: %s", "post", path, instance, date)
encSig := ActivitySign(db, *activity.Actor, sig)
+ signature := fmt.Sprintf("keyId=\"%s\",headers=\"(request-target) host date\",signature=\"%s\"", activity.Actor.PublicKey.Id, encSig)
req.Header.Set("Content-Type", activitystreams)
req.Header.Set("Date", date)
- req.Header.Set("Signature", encSig)
+ req.Header.Set("Signature", signature)
req.Host = instance
_, err = http.DefaultClient.Do(req)
@@ -1803,10 +1804,11 @@ func MakeActivityRequest(db *sql.DB, activity Activity) {
sig := fmt.Sprintf("(request-target): %s %s\\nhost: %s\\ndate: %s", "post", path, instance, date)
encSig := ActivitySign(db, *activity.Actor, sig)
-
+ signature := fmt.Sprintf("keyId=\"%s\",headers=\"(request-target) host date\",signature=\"%s\"", activity.Actor.PublicKey.Id, encSig)
+
req.Header.Set("Content-Type", activitystreams)
req.Header.Set("Date", date)
- req.Header.Set("Signature", encSig)
+ req.Header.Set("Signature", signature)
req.Host = instance
CheckError(err, "error with sending activity req to")