Adapt TLSKey to Debian 10

This commit is contained in:
Adrian Heine 2019-12-06 09:56:28 +01:00
parent bc74acc4ab
commit afa5791d07

View file

@ -43,7 +43,7 @@ impl<C: CommandRunner> Symbol for TlsKey<'_, C> {
return Ok(false); return Ok(false);
} }
let output = self.command_runner.get_output( let stdout = self.command_runner.get_output(
"openssl", "openssl",
&[ &[
OsStr::new("rsa"), OsStr::new("rsa"),
@ -54,7 +54,7 @@ impl<C: CommandRunner> Symbol for TlsKey<'_, C> {
"-text".as_ref(), "-text".as_ref(),
], ],
)?; )?;
Ok(output.starts_with(format!("Private-Key: ({} bit)\n", self.get_bytes()).as_bytes())) Ok(stdout.ends_with("RSA key ok\n".as_bytes()))
} }
fn execute(&self) -> Result<(), Box<dyn Error>> { fn execute(&self) -> Result<(), Box<dyn Error>> {