1
0
Fork 0
forked from alemi/upub

fix: acktually algorithm is required by spec

This commit is contained in:
əlemi 2024-03-26 02:27:40 +01:00
parent 7d1473691e
commit 34a3769fba
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -83,7 +83,7 @@ impl Dispatcher {
let signed_string = format!("(request-target): post {request_target}\nhost: {host}\ndate: {date}");
signer.update(signed_string.as_bytes()).unwrap();
let signature = base64::prelude::BASE64_URL_SAFE.encode(signer.sign_to_vec().unwrap());
let signature_header = format!("keyId=\"{}\",headers=\"(request-target) host date\",signature=\"{signature}\"", delivery.actor);
let signature_header = format!("keyId=\"{}\",algorithm=\"rsa-sha256\",headers=\"(request-target) host date\",signature=\"{signature}\"", delivery.actor);
if let Err(e) = reqwest::Client::new()
.post(&delivery.target)