Skip to main content

minisign

Function minisign 

Source
pub fn minisign(
    asset_filename: &str,
    asset_bytes: &[u8],
    sig_bytes: &[u8],
    trusted_keys: &[String],
) -> Result<()>
Expand description

Verify asset_bytes against the minisign signature sig_bytes under any key in trusted_keys. Returns Ok as soon as one key verifies.

trusted_keys are base64 minisign public keys. Entries that fail to parse are skipped so one malformed key cannot disable a trust set that also holds good ones — but if none parses, that is reported as UpdateError::MalformedPublicKey rather than a signature failure, because the fault is in the binary’s own trust set and not in the download.

§Errors