aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index f98add9..7a30721 100644
--- a/main.go
+++ b/main.go
@@ -1899,7 +1899,8 @@ func MakeActivityRequestOutbox(db *sql.DB, activity Activity) {
path = re.ReplaceAllString(path, "")
sig := fmt.Sprintf("(request-target): %s %s\nhost: %s\ndate: %s", "post", path, instance, date)
- encSig := ActivitySign(db, *activity.Actor, sig)
+ encSig, err := ActivitySign(db, *activity.Actor, sig)
+ CheckError(err, "unable to sign activity response")
signature := fmt.Sprintf("keyId=\"%s\",headers=\"(request-target) host date\",signature=\"%s\"", activity.Actor.PublicKey.Id, encSig)
req.Header.Set("Content-Type", activitystreams)
@@ -1937,7 +1938,8 @@ func MakeActivityRequest(db *sql.DB, activity Activity) {
path = re.ReplaceAllString(path, "")
sig := fmt.Sprintf("(request-target): %s %s\nhost: %s\ndate: %s", "post", path, instance, date)
- encSig := ActivitySign(db, *activity.Actor, sig)
+ encSig, err := ActivitySign(db, *activity.Actor, sig)
+ CheckError(err, "unable to sign activity response")
signature := fmt.Sprintf("keyId=\"%s\",headers=\"(request-target) host date\",signature=\"%s\"", activity.Actor.PublicKey.Id, encSig)
req.Header.Set("Content-Type", activitystreams)