pub struct MockSigner { /* private fields */ }Expand description
Software-keypair signer for tests. Never use in production — the private bytes live in process memory, which defeats the entire point of this crate.
Uses ring’s ECDSA implementation over NIST P-256 with SHA-256.
Implementations§
Source§impl MockSigner
impl MockSigner
Trait Implementations§
Source§impl Debug for MockSigner
impl Debug for MockSigner
Source§impl PlatformSigner for MockSigner
impl PlatformSigner for MockSigner
Source§fn key_id(&self) -> &str
fn key_id(&self) -> &str
Opaque identifier the operator uses to refer to this key (e.g. a
KMS key ARN). Stable across signer instances.
Source§fn algorithm(&self) -> SigningAlgorithm
fn algorithm(&self) -> SigningAlgorithm
Signature algorithm this key produces.
Source§fn public_key_der<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn public_key_der<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
SubjectPublicKeyInfo (DER) for the key. Plugin-hosts use this
to verify signatures the signer produces.Source§fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SignerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sign the given message. The returned bytes are the DER-encoded
ECDSA signature (matches what AWS KMS
Sign returns when called
with MessageType=RAW).Auto Trait Implementations§
impl Freeze for MockSigner
impl RefUnwindSafe for MockSigner
impl Send for MockSigner
impl Sync for MockSigner
impl Unpin for MockSigner
impl UnsafeUnpin for MockSigner
impl UnwindSafe for MockSigner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more