verify_signature

Function verify_signature 

Source
pub fn verify_signature<F>(
    signature: &Signature,
    public_key: &RsaPublicKey,
    content_resolver: F,
    signed_info_bytes: &[u8],
) -> Result<bool>
where F: Fn(&str) -> Result<Vec<u8>>,
Expand description

Verifies a 3MF XML digital signature.

public_key: The RSA public key to use for verification. content_resolver: A closure that takes a URI and returns the content bytes. signed_info_bytes: The RAW canonicalized bytes of the <SignedInfo> element. Note: This is critical. The parser must extract the exact bytes used for signing. 3MF usually requires C14N. If we don’t have a C14N library, we must rely on the raw bytes from the file matching the canonical form (which is often true for generated files) or implement minimal C14N.