From 84af6701234ba988d694dfdc163487aab8bf92b1 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Wed, 19 Jul 2023 13:33:36 -0700 Subject: [PATCH] require correct `ed25519` version to build Fixes https://github.com/wasmCloud/nkeys/issues/17 Signed-off-by: Scott Lamb --- Cargo.toml | 1 + src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b8b5139..f0cc6bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ required-features = ["cli"] [dependencies] signatory = "0.23" +ed25519 = { version = "1.3", default-features = false } ed25519-dalek = { version = "1.0.1", default-features = false, features = ["u64_backend"] } rand = "0.8" byteorder = "1.3.4" diff --git a/src/lib.rs b/src/lib.rs index 346c770..dbab5b1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -254,9 +254,9 @@ impl KeyPair { /// Attempts to verify that the given signature is valid for the given input pub fn verify(&self, input: &[u8], sig: &[u8]) -> Result<()> { - let mut fixedsig = [0; ed25519_dalek::Signature::BYTE_SIZE]; + let mut fixedsig = [0; ed25519::Signature::BYTE_SIZE]; fixedsig.copy_from_slice(sig); - let insig = ed25519_dalek::Signature::from_bytes(&fixedsig)?; + let insig = ed25519::Signature::from_bytes(&fixedsig)?; match self.pk.verify(input, &insig) { Ok(()) => Ok(()),