fix(ci): allow dead code
This commit is contained in:
parent
c7e32b471c
commit
ae8e601c4e
1 changed files with 5 additions and 3 deletions
|
|
@ -23,9 +23,7 @@ use reqwest::Request;
|
||||||
use reqwest_middleware::RequestBuilder;
|
use reqwest_middleware::RequestBuilder;
|
||||||
use rsa::{
|
use rsa::{
|
||||||
pkcs8::{DecodePublicKey, EncodePrivateKey, EncodePublicKey, LineEnding},
|
pkcs8::{DecodePublicKey, EncodePrivateKey, EncodePublicKey, LineEnding},
|
||||||
Pkcs1v15Sign,
|
Pkcs1v15Sign, RsaPrivateKey, RsaPublicKey,
|
||||||
RsaPrivateKey,
|
|
||||||
RsaPublicKey,
|
|
||||||
};
|
};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use sha2::{Digest, Sha256};
|
use sha2::{Digest, Sha256};
|
||||||
|
|
@ -138,6 +136,7 @@ where
|
||||||
/// from any actor of type A, and returns that actor if a valid signature is found.
|
/// from any actor of type A, and returns that actor if a valid signature is found.
|
||||||
/// This function will return an `Err` variant when no signature is found
|
/// This function will return an `Err` variant when no signature is found
|
||||||
/// or if the signature could not be verified.
|
/// or if the signature could not be verified.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub(crate) async fn signing_actor<'a, A, H>(
|
pub(crate) async fn signing_actor<'a, A, H>(
|
||||||
headers: H,
|
headers: H,
|
||||||
method: &Method,
|
method: &Method,
|
||||||
|
|
@ -229,10 +228,12 @@ struct DigestPart {
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub algorithm: String,
|
pub algorithm: String,
|
||||||
/// The hashsum
|
/// The hashsum
|
||||||
|
#[allow(dead_code)]
|
||||||
pub digest: String,
|
pub digest: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DigestPart {
|
impl DigestPart {
|
||||||
|
#[allow(dead_code)]
|
||||||
fn try_from_header(h: &HeaderValue) -> Option<Vec<DigestPart>> {
|
fn try_from_header(h: &HeaderValue) -> Option<Vec<DigestPart>> {
|
||||||
let h = h.to_str().ok()?.split(';').next()?;
|
let h = h.to_str().ok()?.split(';').next()?;
|
||||||
let v: Vec<_> = h
|
let v: Vec<_> = h
|
||||||
|
|
@ -257,6 +258,7 @@ impl DigestPart {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Verify body of an inbox request against the hash provided in `Digest` header.
|
/// Verify body of an inbox request against the hash provided in `Digest` header.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub(crate) fn verify_body_hash(
|
pub(crate) fn verify_body_hash(
|
||||||
digest_header: Option<&HeaderValue>,
|
digest_header: Option<&HeaderValue>,
|
||||||
body: &[u8],
|
body: &[u8],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue