Function verify_from_file

Source
pub fn verify_from_file<'a>(
    signed_file: &Path,
    certs: &[&'a OpenpgpCert],
    signatures: &[&'a OpenpgpSignature],
) -> Result<Vec<(&'a OpenpgpSignature, Option<(&'a OpenpgpCert, String)>)>, Error>
Expand description

Verifies one or more signatures for a signed_file with one or more certs.

All signatures are used to check the data in signed_file. For each signature, all certs are considered for finding a matching component key for signing.

The return value is a list of tuples, one entry for each signature (in order). Signatures that could not be positively verified have a None entry. Successfully verified signatures have a Some entry with a tuple of a signature, certificate and the fingerprint of the component key which verified the data in signed_file.

§Note

Does not consider OpenPGP signatures with an unset creation time and instead emits a warning for them.

§Errors

Returns an error, if the signed_file cannot be read.