pub trait CertificateVerifier: Send + Sync {
// Required methods
fn verify_genesis_certificate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
genesis_certificate: &'life1 Certificate,
genesis_verification_key: &'life2 ProtocolGenesisVerificationKey,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn verify_standard_certificate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
certificate: &'life1 Certificate,
previous_certificate: &'life2 Certificate,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn verify_certificate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
certificate: &'life1 Certificate,
genesis_verification_key: &'life2 ProtocolGenesisVerificationKey,
) -> Pin<Box<dyn Future<Output = StdResult<Option<Certificate>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn verify_certificate_chain<'life0, 'life1, 'async_trait>(
&'life0 self,
certificate: Certificate,
genesis_verification_key: &'life1 ProtocolGenesisVerificationKey,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Expand description
CertificateVerifier is the cryptographic engine in charge of verifying multi signatures and certificates
Required Methods§
sourcefn verify_genesis_certificate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
genesis_certificate: &'life1 Certificate,
genesis_verification_key: &'life2 ProtocolGenesisVerificationKey,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify_genesis_certificate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
genesis_certificate: &'life1 Certificate,
genesis_verification_key: &'life2 ProtocolGenesisVerificationKey,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify Genesis certificate
sourcefn verify_standard_certificate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
certificate: &'life1 Certificate,
previous_certificate: &'life2 Certificate,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify_standard_certificate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
certificate: &'life1 Certificate,
previous_certificate: &'life2 Certificate,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify Standard certificate
sourcefn verify_certificate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
certificate: &'life1 Certificate,
genesis_verification_key: &'life2 ProtocolGenesisVerificationKey,
) -> Pin<Box<dyn Future<Output = StdResult<Option<Certificate>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify_certificate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
certificate: &'life1 Certificate,
genesis_verification_key: &'life2 ProtocolGenesisVerificationKey,
) -> Pin<Box<dyn Future<Output = StdResult<Option<Certificate>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify if a Certificate is valid and returns the previous Certificate in the chain if exists
Provided Methods§
sourcefn verify_certificate_chain<'life0, 'life1, 'async_trait>(
&'life0 self,
certificate: Certificate,
genesis_verification_key: &'life1 ProtocolGenesisVerificationKey,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify_certificate_chain<'life0, 'life1, 'async_trait>(
&'life0 self,
certificate: Certificate,
genesis_verification_key: &'life1 ProtocolGenesisVerificationKey,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Verify that the Certificate Chain associated to a Certificate is valid