aboutsummaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
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;