Remove test framework for toolbox strip-userid.

- Fixes e61a03f863.
This commit is contained in:
Justus Winter 2024-11-19 13:28:35 +01:00
parent e1da05bc6f
commit 784e011922
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386

View File

@ -1454,27 +1454,6 @@ impl Sq {
.expect("succeeds") .expect("succeeds")
} }
/// Strips user IDs to the given key.
pub fn toolbox_strip_userid(&self, key: Cert, args: &[&str]) -> Result<Cert> {
let mut cmd = self.command();
cmd.args(["toolbox", "strip-userid"]);
for arg in args {
cmd.arg(arg);
}
let in_filename = self.scratch_file(None);
key.as_tsk().serialize(&mut File::create(&in_filename)?)?;
cmd.arg("--cert-file").arg(&in_filename);
let out_filename = self.scratch_file(None);
cmd.arg("--output").arg(&out_filename);
let output = self.run(cmd, Some(true));
let out_key = Cert::from_file(&out_filename)?;
assert!(out_key.is_tsk());
Ok(out_key)
}
/// Runs `sq cert list` with the supplied arguments. /// Runs `sq cert list` with the supplied arguments.
pub fn cert_list_maybe(&self, args: &[&str]) -> Result<Vec<u8>> { pub fn cert_list_maybe(&self, args: &[&str]) -> Result<Vec<u8>> {
let mut cmd = self.command(); let mut cmd = self.command();