diff --git a/Cargo.toml b/Cargo.toml index 6a0e84a..f791e85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cesride" -version = "0.6.0" +version = "0.6.1" edition = "2021" description = "Cryptographic primitives for use with Composable Event Streaming Representation (CESR)" license = "Apache-2.0" diff --git a/src/core/matter/mod.rs b/src/core/matter/mod.rs index 8c9e8aa..09022ad 100644 --- a/src/core/matter/mod.rs +++ b/src/core/matter/mod.rs @@ -171,8 +171,12 @@ pub trait Matter: Default { } fn transferable(&self) -> bool { - const CODES: &[&str] = - &[tables::Codex::Ed25519N, tables::Codex::ECDSA_256k1N, tables::Codex::Ed448N]; + const CODES: &[&str] = &[ + tables::Codex::Ed25519N, + tables::Codex::ECDSA_256k1N, + tables::Codex::Ed448N, + tables::Codex::ECDSA_256r1N, + ]; !CODES.contains(&self.code().as_str()) } @@ -817,8 +821,10 @@ mod test { #[rstest] #[case(TestMatter::new_with_code_and_raw(matter::Codex::Ed25519, b"00000000000000000000000000000000").unwrap(), true)] #[case(TestMatter::new_with_code_and_raw(matter::Codex::ECDSA_256k1, b"000000000000000000000000000000000").unwrap(), true)] + #[case(TestMatter::new_with_code_and_raw(matter::Codex::ECDSA_256r1, b"000000000000000000000000000000000").unwrap(), true)] #[case(TestMatter::new_with_code_and_raw(matter::Codex::Ed25519N, b"00000000000000000000000000000000").unwrap(), false)] #[case(TestMatter::new_with_code_and_raw(matter::Codex::ECDSA_256k1N, b"000000000000000000000000000000000").unwrap(), false)] + #[case(TestMatter::new_with_code_and_raw(matter::Codex::ECDSA_256r1N, b"000000000000000000000000000000000").unwrap(), false)] fn transferable(#[case] matter: TestMatter, #[case] result: bool) { assert_eq!(matter.transferable(), result); }