Skip to main content

RemoteAuthority

Trait RemoteAuthority 

Source
pub trait RemoteAuthority:
    Send
    + Sync
    + Debug {
    // Required methods
    fn name(&self) -> &str;
    fn cert_chain(&self) -> &[CertificateDer<'static>];

    // Provided methods
    fn public_key(&self) -> SubjectPublicKeyInfoDer<'_> { ... }
    fn verify(
        &self,
        data: &[u8],
        signature: &[u8],
    ) -> BoxFuture<'_, Result<bool, VerifyError>> { ... }
}
Expand description

Remote authority for DHTTP identity material.

Verification uses the same DHTTP canonical key-to-signature-scheme policy as LocalAuthority. The policy is:

A remote authority does not carry an explicit signature scheme in its API; the scheme is derived from the authority public key according to the documented DHTTP policy.

Required Methods§

Source

fn name(&self) -> &str

Source

fn cert_chain(&self) -> &[CertificateDer<'static>]

Provided Methods§

Source

fn public_key(&self) -> SubjectPublicKeyInfoDer<'_>

Source

fn verify( &self, data: &[u8], signature: &[u8], ) -> BoxFuture<'_, Result<bool, VerifyError>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§