commit 829cdb6
default
·
2023-02-02 03:16:17 +0000 UTC
parent adff9c5
Move the #main-key adding back to the origin.
1 files changed,
+2,
-3
M
http.c
M
http.c
+2,
-3
1@@ -70,7 +70,7 @@ xs_dict *http_signed_request_raw(const char *keyid, const char *seckey,
2 }
3
4 /* build now the signature header */
5- signature = xs_fmt("keyId=\"%s\","
6+ signature = xs_fmt("keyId=\"%s#main-key\","
7 "algorithm=\"rsa-sha256\","
8 "headers=\"(request-target) host digest date\","
9 "signature=\"%s\"",
10@@ -109,11 +109,10 @@ xs_dict *http_signed_request(snac *snac, const char *method, const char *url,
11 int timeout)
12 /* does a signed HTTP request */
13 {
14- xs *keyid = xs_fmt("%s#main-key", snac->actor);
15 char *seckey = xs_dict_get(snac->key, "secret");
16 xs_dict *response;
17
18- response = http_signed_request_raw(keyid, seckey, method, url,
19+ response = http_signed_request_raw(snac->actor, seckey, method, url,
20 headers, body, b_size, status, payload, p_size, timeout);
21
22 return response;