forked from brl/citadel-tools
Compare commits
1 Commits
master
...
reproducib
Author | SHA1 | Date | |
---|---|---|---|
df8e0be407 |
@ -28,7 +28,13 @@ impl Verity {
|
|||||||
let image = image.as_ref();
|
let image = image.as_ref();
|
||||||
let output = output.as_ref();
|
let output = output.as_ref();
|
||||||
// Don't use absolute path to veritysetup so that the build will correctly find the version from cryptsetup-native
|
// Don't use absolute path to veritysetup so that the build will correctly find the version from cryptsetup-native
|
||||||
let output = cmd_with_output!("veritysetup", "format {} {}", image.display(), output.display())?;
|
let output = cmd_with_output!(
|
||||||
|
"veritysetup",
|
||||||
|
"format --uuid=11298b29-ee7b-41b9-bf5e-2c4686d52c9e --salt=94dc0d754adb61f0221d2078713ffe1a0af0914d8f653fd61cd4f3362111720f {} {}",
|
||||||
|
image.display(),
|
||||||
|
output.display()
|
||||||
|
)?;
|
||||||
|
|
||||||
Ok(VerityOutput::parse(&output))
|
Ok(VerityOutput::parse(&output))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,8 +57,10 @@ impl Verity {
|
|||||||
bail!("actual file size ({}) does not match expected size ({})", len, expected);
|
bail!("actual file size ({}) does not match expected size ({})", len, expected);
|
||||||
}
|
}
|
||||||
let vout = LoopDevice::with_loop(self.path(), Some(4096), true, |loopdev| {
|
let vout = LoopDevice::with_loop(self.path(), Some(4096), true, |loopdev| {
|
||||||
let output = cmd_with_output!(Self::VERITYSETUP, "--data-blocks={} --salt={} format {} {}",
|
let output = cmd_with_output!(Self::VERITYSETUP, "--data-blocks={} --uuid=11298b29-ee7b-41b9-bf5e-2c4686d52c9e
|
||||||
nblocks, salt, loopdev, verityfile.display())?;
|
--salt=94dc0d754adb61f0221d2078713ffe1a0af0914d8f653fd61cd4f3362111720f format {} {}",
|
||||||
|
nblocks, loopdev, verityfile.display())?;
|
||||||
|
|
||||||
Ok(VerityOutput::parse(&output))
|
Ok(VerityOutput::parse(&output))
|
||||||
})?;
|
})?;
|
||||||
let mut input = File::open(&verityfile)
|
let mut input = File::open(&verityfile)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user