|
@ -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>> {
|
|
|