From a1d153dc8d03098cb96affe1cbb17040dc4efafa Mon Sep 17 00:00:00 2001 From: "przydatek@github.com" Date: Tue, 28 May 2024 12:44:40 +0200 Subject: [PATCH] Add IC canister signature to JwsAlgorithm --- identity_jose/src/jws/algorithm.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/identity_jose/src/jws/algorithm.rs b/identity_jose/src/jws/algorithm.rs index a60dc84050..a8674dad28 100644 --- a/identity_jose/src/jws/algorithm.rs +++ b/identity_jose/src/jws/algorithm.rs @@ -45,6 +45,8 @@ pub enum JwsAlgorithm { NONE, /// EdDSA signature algorithms EdDSA, + /// IC canister signature + IcCs, } impl JwsAlgorithm { @@ -65,6 +67,7 @@ impl JwsAlgorithm { Self::ES256K, Self::NONE, Self::EdDSA, + Self::IcCs, ]; /// Returns the JWS algorithm as a `str` slice. @@ -85,6 +88,7 @@ impl JwsAlgorithm { Self::ES256K => "ES256K", Self::NONE => "none", Self::EdDSA => "EdDSA", + Self::IcCs => "IcCs", } } } @@ -109,6 +113,7 @@ impl FromStr for JwsAlgorithm { "ES256K" => Ok(Self::ES256K), "none" => Ok(Self::NONE), "EdDSA" => Ok(Self::EdDSA), + "IcCs" => Ok(Self::IcCs), _ => Err(Error::JwsAlgorithmParsingError), } }