diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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") |