[][src]Trait sequoia_openpgp::parse::stream::VerificationHelper

pub trait VerificationHelper {
    fn get_public_keys(&mut self, _: &[KeyID]) -> Result<Vec<TPK>>;
fn check(&mut self, sigs: Vec<Vec<VerificationResult>>) -> Result<()>; }

Helper for signature verification.

Required methods

fn get_public_keys(&mut self, _: &[KeyID]) -> Result<Vec<TPK>>

Retrieves the TPKs containing the specified keys.

fn check(&mut self, sigs: Vec<Vec<VerificationResult>>) -> Result<()>

Conveys the result of a signature verification.

This is called after the last signature has been verified. This is the place to implement your verification policy. Check that the required number of signatures or notarizations were confirmed as valid.

The argument is a vector, with sigs[0] being the vector of signatures over the data, vec[1] being notarizations over signatures of level 0, and the data, and so on.

This callback is only called before all data is returned. That is, once io::Read returns EOF, this callback will not be called again. As such, any error returned by this function will abort reading, and the error will be propagated via the io::Read operation.

Loading content...

Implementors

Loading content...