From 6a7acbcb443474af058d69dc39a98fbe9679dde7 Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Fri, 19 Nov 2021 14:51:28 -0600 Subject: [PATCH] rustcrypto: remove dead trait impl, rename error type --- apub-rustcrypto/src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apub-rustcrypto/src/lib.rs b/apub-rustcrypto/src/lib.rs index 5a8c38d..0ba5196 100644 --- a/apub-rustcrypto/src/lib.rs +++ b/apub-rustcrypto/src/lib.rs @@ -5,7 +5,7 @@ use sha2::{Digest, Sha256}; use std::fmt::Debug; #[derive(Debug, thiserror::Error)] -pub enum RustCryptoError { +pub enum RustcryptoError { #[error(transparent)] Pkcs8(#[from] rsa::pkcs8::Error), @@ -63,7 +63,7 @@ impl apub_core::digest::Digest for Sha256Digest { } impl apub_core::signature::Sign for RsaSigner { - type Error = RustCryptoError; + type Error = RustcryptoError; fn sign(&self, signing_string: &str) -> Result { let hashed = Sha256::digest(signing_string.as_bytes()); @@ -78,7 +78,7 @@ impl apub_core::signature::Sign for RsaSigner { } impl apub_core::signature::Verify for RsaVerifier { - type Error = RustCryptoError; + type Error = RustcryptoError; fn build(public_key_pem: &str) -> Result where @@ -121,9 +121,6 @@ impl apub_core::signature::SignFactory for Rustcrypto { } } } -impl apub_core::signature::VerifyFactory for Rustcrypto { - type Verifier = RsaVerifier; -} impl Debug for RsaSigner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {