mirror of
https://git.asonix.dog/asonix/http-signature-normalization.git
synced 2024-11-25 10:51:01 +00:00
Update dependencies - ring is public
This commit is contained in:
parent
369a1e8a96
commit
bf8e0e5f69
4 changed files with 17 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "http-signature-normalization-actix"
|
name = "http-signature-normalization-actix"
|
||||||
description = "An HTTP Signatures library that leaves the signing to you"
|
description = "An HTTP Signatures library that leaves the signing to you"
|
||||||
version = "0.10.4"
|
version = "0.11.0"
|
||||||
authors = ["asonix <asonix@asonix.dog>"]
|
authors = ["asonix <asonix@asonix.dog>"]
|
||||||
license = "AGPL-3.0"
|
license = "AGPL-3.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
@ -32,13 +32,13 @@ actix-http = { version = "3.0.2", default-features = false }
|
||||||
actix-rt = "2.6.0"
|
actix-rt = "2.6.0"
|
||||||
actix-web = { version = "4.0.0", default-features = false, optional = true }
|
actix-web = { version = "4.0.0", default-features = false, optional = true }
|
||||||
awc = { version = "3.0.0", default-features = false, optional = true }
|
awc = { version = "3.0.0", default-features = false, optional = true }
|
||||||
base64 = { version = "0.13", optional = true }
|
base64 = { version = "0.21", optional = true }
|
||||||
futures-core = "0.3.28"
|
futures-core = "0.3.28"
|
||||||
http-signature-normalization = { version = "0.7.0", path = ".." }
|
http-signature-normalization = { version = "0.7.0", path = ".." }
|
||||||
ring = { version = "0.16.20", optional = true }
|
ring = { version = "0.17.5", optional = true }
|
||||||
sha2 = { version = "0.10", optional = true }
|
sha2 = { version = "0.10", optional = true }
|
||||||
sha3 = { version = "0.10", optional = true }
|
sha3 = { version = "0.10", optional = true }
|
||||||
streem = "0.1.1"
|
streem = "0.2.0"
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
tokio = { version = "1", default-features = false, features = ["sync"] }
|
tokio = { version = "1", default-features = false, features = ["sync"] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
|
@ -47,7 +47,7 @@ tracing-futures = "0.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-rt = "2.6.0"
|
actix-rt = "2.6.0"
|
||||||
tracing-actix-web = { version = "0.6.0" }
|
tracing-actix-web = { version = "0.7.0" }
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
|
|
|
@ -96,11 +96,12 @@ impl DigestName for Sha512 {
|
||||||
mod client {
|
mod client {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::digest::DigestCreate;
|
use crate::digest::DigestCreate;
|
||||||
|
use base64::prelude::*;
|
||||||
|
|
||||||
fn create(mut context: ring::digest::Context, input: &[u8]) -> String {
|
fn create(mut context: ring::digest::Context, input: &[u8]) -> String {
|
||||||
context.update(input);
|
context.update(input);
|
||||||
let digest = context.finish();
|
let digest = context.finish();
|
||||||
base64::encode(digest.as_ref())
|
BASE64_STANDARD.encode(digest.as_ref())
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DigestCreate for Sha256 {
|
impl DigestCreate for Sha256 {
|
||||||
|
@ -126,6 +127,7 @@ mod client {
|
||||||
mod server {
|
mod server {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::digest::{DigestPart, DigestVerify};
|
use crate::digest::{DigestPart, DigestVerify};
|
||||||
|
use base64::prelude::*;
|
||||||
use tracing::{debug, warn};
|
use tracing::{debug, warn};
|
||||||
|
|
||||||
fn verify(context: ring::digest::Context, name: &str, parts: &[DigestPart]) -> bool {
|
fn verify(context: ring::digest::Context, name: &str, parts: &[DigestPart]) -> bool {
|
||||||
|
@ -135,7 +137,7 @@ mod server {
|
||||||
{
|
{
|
||||||
debug!("Verifying digest type, {}", name);
|
debug!("Verifying digest type, {}", name);
|
||||||
let digest = context.finish();
|
let digest = context.finish();
|
||||||
let encoded = base64::encode(digest.as_ref());
|
let encoded = BASE64_STANDARD.encode(digest.as_ref());
|
||||||
|
|
||||||
return part.digest == encoded;
|
return part.digest == encoded;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,13 +21,14 @@ impl DigestName for Sha512 {
|
||||||
mod client {
|
mod client {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::digest::DigestCreate;
|
use crate::digest::DigestCreate;
|
||||||
|
use base64::prelude::*;
|
||||||
|
|
||||||
fn create<D: sha2::Digest + sha2::digest::FixedOutputReset>(
|
fn create<D: sha2::Digest + sha2::digest::FixedOutputReset>(
|
||||||
digest: &mut D,
|
digest: &mut D,
|
||||||
input: &[u8],
|
input: &[u8],
|
||||||
) -> String {
|
) -> String {
|
||||||
sha2::Digest::update(digest, input);
|
sha2::Digest::update(digest, input);
|
||||||
base64::encode(&digest.finalize_reset())
|
BASE64_STANDARD.encode(&digest.finalize_reset())
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DigestCreate for Sha224 {
|
impl DigestCreate for Sha224 {
|
||||||
|
@ -59,6 +60,7 @@ mod client {
|
||||||
mod server {
|
mod server {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::digest::{DigestPart, DigestVerify};
|
use crate::digest::{DigestPart, DigestVerify};
|
||||||
|
use base64::prelude::*;
|
||||||
use tracing::{debug, warn};
|
use tracing::{debug, warn};
|
||||||
|
|
||||||
fn verify<D: sha2::Digest + sha2::digest::FixedOutputReset>(
|
fn verify<D: sha2::Digest + sha2::digest::FixedOutputReset>(
|
||||||
|
@ -71,7 +73,7 @@ mod server {
|
||||||
.find(|p| p.algorithm.to_lowercase() == name.to_lowercase())
|
.find(|p| p.algorithm.to_lowercase() == name.to_lowercase())
|
||||||
{
|
{
|
||||||
debug!("Verifying digest type, {}", name);
|
debug!("Verifying digest type, {}", name);
|
||||||
let encoded = base64::encode(&digest.finalize_reset());
|
let encoded = BASE64_STANDARD.encode(&digest.finalize_reset());
|
||||||
|
|
||||||
return part.digest == encoded;
|
return part.digest == encoded;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,13 +44,14 @@ impl DigestName for Sha3_512 {
|
||||||
mod client {
|
mod client {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::digest::DigestCreate;
|
use crate::digest::DigestCreate;
|
||||||
|
use base64::prelude::*;
|
||||||
|
|
||||||
fn create<D: sha3::Digest + sha3::digest::FixedOutputReset>(
|
fn create<D: sha3::Digest + sha3::digest::FixedOutputReset>(
|
||||||
digest: &mut D,
|
digest: &mut D,
|
||||||
input: &[u8],
|
input: &[u8],
|
||||||
) -> String {
|
) -> String {
|
||||||
digest.update(input);
|
digest.update(input);
|
||||||
base64::encode(&digest.finalize_reset())
|
BASE64_STANDARD.encode(&digest.finalize_reset())
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DigestCreate for Sha3_224 {
|
impl DigestCreate for Sha3_224 {
|
||||||
|
@ -112,6 +113,7 @@ mod client {
|
||||||
mod server {
|
mod server {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::digest::{DigestPart, DigestVerify};
|
use crate::digest::{DigestPart, DigestVerify};
|
||||||
|
use base64::prelude::*;
|
||||||
use tracing::{debug, warn};
|
use tracing::{debug, warn};
|
||||||
|
|
||||||
fn verify<D: sha3::Digest + sha3::digest::FixedOutputReset>(
|
fn verify<D: sha3::Digest + sha3::digest::FixedOutputReset>(
|
||||||
|
@ -124,7 +126,7 @@ mod server {
|
||||||
.find(|p| p.algorithm.to_lowercase() == name.to_lowercase())
|
.find(|p| p.algorithm.to_lowercase() == name.to_lowercase())
|
||||||
{
|
{
|
||||||
debug!("Verifying digest type, {}", name);
|
debug!("Verifying digest type, {}", name);
|
||||||
let encoded = base64::encode(&digest.finalize_reset());
|
let encoded = BASE64_STANDARD.encode(&digest.finalize_reset());
|
||||||
|
|
||||||
return part.digest == encoded;
|
return part.digest == encoded;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue