pub struct Ed25519Verifier { /* private fields */ }Expand description
Verifies plugin signatures against a fixed set of trusted public keys. 用一组固定可信公钥验证插件签名。
Implementations§
Source§impl Ed25519Verifier
impl Ed25519Verifier
Sourcepub const fn new(keys: &'static [TrustedPublicKey]) -> Self
pub const fn new(keys: &'static [TrustedPublicKey]) -> Self
Trust exactly the listed keys for the lifetime of the verifier. 在验证器生命周期内只信任列出的公钥。
Trait Implementations§
Source§impl Clone for Ed25519Verifier
impl Clone for Ed25519Verifier
impl Copy for Ed25519Verifier
Source§impl Debug for Ed25519Verifier
impl Debug for Ed25519Verifier
Source§impl PluginSignatureVerifier for Ed25519Verifier
impl PluginSignatureVerifier for Ed25519Verifier
Source§fn verify(
&self,
manifest: PluginManifest,
payload: &[u8],
fingerprint: &str,
) -> bool
fn verify( &self, manifest: PluginManifest, payload: &[u8], fingerprint: &str, ) -> bool
Check manifest.signature against the canonical payload.
用给定的规范化 payload 校验 manifest.signature。
The payload is the message the kernel built for the artifact — manifest fields, the registration that travels with the bytes, and the bytes themselves — so this verifier never reassembles it and cannot drop a field the kernel added. 载荷是内核为工件构造的消息——manifest 字段、随字节同行的注册声明,以及字节本身——因此 本验证器不自行拼装消息,也不会丢掉内核加入的字段。
Auto Trait Implementations§
impl Freeze for Ed25519Verifier
impl RefUnwindSafe for Ed25519Verifier
impl Send for Ed25519Verifier
impl Sync for Ed25519Verifier
impl Unpin for Ed25519Verifier
impl UnsafeUnpin for Ed25519Verifier
impl UnwindSafe for Ed25519Verifier
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