From 392c014c26ccf8c5281b3bc7f33024f1f3b3f990 Mon Sep 17 00:00:00 2001 From: default Date: Thu, 29 Sep 2022 14:44:24 +0200 Subject: New function check_signature() (incomplete). --- activitypub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'activitypub.c') diff --git a/activitypub.c b/activitypub.c index cebefca..7a30010 100644 --- a/activitypub.c +++ b/activitypub.c @@ -594,7 +594,10 @@ int process_message(snac *snac, char *msg, char *req) } /* check the signature */ - /* ... */ + if (!check_signature(snac, req)) { + snac_log(snac, xs_fmt("bad signature")); + return 1; + } if (strcmp(type, "Follow") == 0) { xs *reply = msg_accept(snac, msg, actor); -- cgit v1.2.3