pub struct SignatureManager { /* private fields */ }Expand description
Plugin signature manager
Implementations§
Source§impl SignatureManager
impl SignatureManager
Sourcepub fn register_key(&mut self, key: KeyInfo) -> Result<()>
pub fn register_key(&mut self, key: KeyInfo) -> Result<()>
Register a key
Sourcepub fn is_trusted(&self, key_id: &str) -> bool
pub fn is_trusted(&self, key_id: &str) -> bool
Check if a key is trusted
Sourcepub fn verify_signature(
&self,
signature: &PluginSignature,
payload: &[u8],
) -> Result<VerificationResult>
pub fn verify_signature( &self, signature: &PluginSignature, payload: &[u8], ) -> Result<VerificationResult>
Verify signature against the provided payload
Sourcepub fn assess_trust_level(&self, signatures: &[PluginSignature]) -> TrustLevel
pub fn assess_trust_level(&self, signatures: &[PluginSignature]) -> TrustLevel
Determine trust level for a plugin based on signatures
Sourcepub fn export_public_key(&self, key_id: &str) -> Result<String>
pub fn export_public_key(&self, key_id: &str) -> Result<String>
Export public key in PEM format
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SignatureManager
impl RefUnwindSafe for SignatureManager
impl Send for SignatureManager
impl Sync for SignatureManager
impl Unpin for SignatureManager
impl UnsafeUnpin for SignatureManager
impl UnwindSafe for SignatureManager
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