pub fn verify_device_signature(
manifest: &AssetManifest,
directory: &DeviceDirectory,
) -> Result<(), RejectReason>Expand description
Steps 6–8 of verify_asset: the manifest’s signer is a device of directory, added no
later than the manifest’s timestamp, and its signing key produced device_sig.
Public because the server’s index rebuild checks exactly this against the directory version its owner ledger recorded, and a second implementation of the device check would be a second answer to a question the threat model allows one answer to. Revocation is not judged here: a device a later directory revoked still verifies the manifests it signed before, and whether a revoked entry may sign at all is the caller’s rule.
§Errors
RejectReason::UnknownDevice when directory is another user’s or does not list the
device, RejectReason::BadTimestamp or RejectReason::DeviceAddedAfter for step 7, and
RejectReason::BadDeviceSig when the signature does not verify under the entry’s key.