aboutsummaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-06-24 08:45:27 +0200
committergrunfink <grunfink@comam.es>2026-06-24 08:45:27 +0200
commitbe894b379e72126a28c1aeaa79d4c5eab787638a (patch)
tree0a430b33508bcd299a0f440502e537913061af8a /http.c
parenta0fada72cc4829d757a8691d214069b27aa80fbb (diff)
Added an new keyId check.
Diffstat (limited to 'http.c')
-rw-r--r--http.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/http.c b/http.c
index 125d346..95cc489 100644
--- a/http.c
+++ b/http.c
@@ -123,7 +123,7 @@ xs_dict *http_signed_request(snac *snac, const char *method, const char *url,
}
-int check_signature(const xs_dict *req, xs_str **err)
+int check_signature(const xs_dict *req, xs_str **err, xs_str **key_id)
/* check the signature */
{
const char *sig_hdr = xs_dict_get(req, "signature");
@@ -182,6 +182,9 @@ int check_signature(const xs_dict *req, xs_str **err)
if ((p = strchr(keyId, '#')) != NULL)
*p = '\0';
+ /* copy the keyId */
+ *key_id = xs_dup(keyId);
+
xs *actor = NULL;
int status;