From 96d3e78fa238c42277e51ca0cb092aeae4a8e623 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 29 Feb 2024 23:33:40 +0900 Subject: [PATCH] add debug and clone for keys enum --- Cargo.toml | 2 +- httpsig-hyper/Cargo.toml | 2 +- httpsig/src/crypto/asymmetric.rs | 2 ++ httpsig/src/crypto/symmetric.rs | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 262026f..38aab06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ resolver = "2" [workspace.package] edition = "2021" -version = "0.0.7" +version = "0.0.8" authors = ["Jun Kurihara"] homepage = "https://github.com/junkurihara/httpsig-rs" repository = "https://github.com/junkurihara/httpsig-rs" diff --git a/httpsig-hyper/Cargo.toml b/httpsig-hyper/Cargo.toml index f6db9e4..d4ea7ad 100644 --- a/httpsig-hyper/Cargo.toml +++ b/httpsig-hyper/Cargo.toml @@ -13,7 +13,7 @@ rust-version.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -httpsig = { path = "../httpsig", version = "0.0.7" } +httpsig = { path = "../httpsig", version = "0.0.8" } thiserror = { version = "1.0.57" } tracing = { version = "0.1.40" } diff --git a/httpsig/src/crypto/asymmetric.rs b/httpsig/src/crypto/asymmetric.rs index a0619cc..81febdb 100644 --- a/httpsig/src/crypto/asymmetric.rs +++ b/httpsig/src/crypto/asymmetric.rs @@ -32,6 +32,7 @@ mod params_oids { } /* -------------------------------- */ +#[derive(Debug, Clone)] /// Secret key for http signature /// Name conventions follow [Section-6.2.2, RFC9421](https://datatracker.ietf.org/doc/html/rfc9421#section-6.2.2) pub enum SecretKey { @@ -170,6 +171,7 @@ impl super::VerifyingKey for SecretKey { } /* -------------------------------- */ +#[derive(Debug, Clone)] /// Public key for http signature, only for asymmetric algorithm /// Name conventions follow [Section 6.2.2, RFC9421](https://datatracker.ietf.org/doc/html/rfc9421#section-6.2.2) pub enum PublicKey { diff --git a/httpsig/src/crypto/symmetric.rs b/httpsig/src/crypto/symmetric.rs index c195d02..d2f82ca 100644 --- a/httpsig/src/crypto/symmetric.rs +++ b/httpsig/src/crypto/symmetric.rs @@ -10,6 +10,7 @@ use sha2::{Digest, Sha256}; type HmacSha256 = Hmac; /* -------------------------------- */ +#[derive(Debug, Clone)] /// Shared key for http signature /// Name conventions follow [Section 6.2.2, RFC9421](https://datatracker.ietf.org/doc/html/rfc9421#section-6.2.2) pub enum SharedKey {