mirror of
https://github.com/dariusk/rss-to-activitypub.git
synced 2024-11-22 17:29:19 +02:00
Add algorithm field for Misskey compatibility
This commit is contained in:
parent
520f9b87e6
commit
d7a3f8b765
|
@ -27,7 +27,8 @@ function signAndSend(message, name, domain, req, res, targetDomain) {
|
||||||
signer.end();
|
signer.end();
|
||||||
const signature = signer.sign(privkey);
|
const signature = signer.sign(privkey);
|
||||||
const signature_b64 = signature.toString('base64');
|
const signature_b64 = signature.toString('base64');
|
||||||
let header = `keyId="https://${domain}/u/${name}",headers="(request-target) host date digest",signature="${signature_b64}"`;
|
const algorithm = 'rsa-sha256';
|
||||||
|
let header = `keyId="https://${domain}/u/${name}",algorithm="${algorithm}",headers="(request-target) host date digest",signature="${signature_b64}"`;
|
||||||
console.log('signature:',header);
|
console.log('signature:',header);
|
||||||
console.log('message:',message);
|
console.log('message:',message);
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,8 @@ function signAndSend(message, name, domain, req, res, targetDomain, inbox) {
|
||||||
signer.end();
|
signer.end();
|
||||||
const signature = signer.sign(privkey);
|
const signature = signer.sign(privkey);
|
||||||
const signature_b64 = signature.toString('base64');
|
const signature_b64 = signature.toString('base64');
|
||||||
let header = `keyId="https://${domain}/u/${name}",headers="(request-target) host date digest",signature="${signature_b64}"`;
|
const algorithm = 'rsa-sha256';
|
||||||
|
let header = `keyId="https://${domain}/u/${name}",algorithm="${algorithm}",headers="(request-target) host date digest",signature="${signature_b64}"`;
|
||||||
//console.log('signature:',header);
|
//console.log('signature:',header);
|
||||||
request({
|
request({
|
||||||
url: inbox,
|
url: inbox,
|
||||||
|
|
Loading…
Reference in New Issue