pub fn open_config<ObjectID: FsVerityHashValue>(
repo: &Repository<ObjectID>,
config_digest: &str,
verity: Option<&ObjectID>,
) -> Result<(ImageConfiguration, HashMap<Box<str>, ObjectID>)>Expand description
Opens and parses a container configuration.
Reads the OCI image configuration from the repository and returns both the parsed configuration and a digest map containing fs-verity hashes for all referenced layers.
If verity is provided, it’s used directly. Otherwise, the name must be a sha256 digest and the corresponding verity hash will be looked up (which is more expensive) and the content will be hashed and compared to the provided digest.
Returns the parsed image configuration and the map of layer references.
Note: if the verity value is known and trusted then the layer fs-verity values can also be trusted. If not, then you can use the layer map to find objects that are ostensibly the layers in question, but you’ll have to verity their content hashes yourself.