diff --git a/routes/inbox.js b/routes/inbox.js index f6221f6..d719e4f 100644 --- a/routes/inbox.js +++ b/routes/inbox.js @@ -27,7 +27,8 @@ function signAndSend(message, name, domain, req, res, targetDomain) { signer.end(); const signature = signer.sign(privkey); 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('message:',message); diff --git a/updateFeeds.js b/updateFeeds.js index a8e5a6d..39c5aca 100644 --- a/updateFeeds.js +++ b/updateFeeds.js @@ -182,7 +182,8 @@ function signAndSend(message, name, domain, req, res, targetDomain, inbox) { signer.end(); const signature = signer.sign(privkey); 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); request({ url: inbox,