Prereqs
This commit is contained in:
parent
7d629e38d8
commit
2ccc56a097
5 changed files with 32 additions and 4 deletions
|
|
@ -3,6 +3,7 @@ use std::error::Error;
|
|||
use std::fmt;
|
||||
|
||||
use command_runner::CommandRunner;
|
||||
use resources::{Resource, FileResource};
|
||||
use symbols::Symbol;
|
||||
|
||||
pub struct TlsCsr<'a> {
|
||||
|
|
@ -50,6 +51,10 @@ impl<'a> Symbol for TlsCsr<'a> {
|
|||
let output = try!(self.command_runner.run_with_args("openssl", &["req", "-new", "-sha256", "-key", &self.get_key_path(), "-out", &self.get_csr_path(), "-subj", &format!("/CN={}", self.domain)]).map_err(|e| Box::new(e)));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn get_prerequisites(&self) -> Vec<Box<Resource>> {
|
||||
vec![Box::new(FileResource { path: self.get_key_path().into() })]
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ use std::error::Error;
|
|||
use std::fmt;
|
||||
|
||||
use command_runner::CommandRunner;
|
||||
use resources::{Resource, FileResource};
|
||||
use symbols::Symbol;
|
||||
|
||||
pub struct SelfSignedTlsCert<'a> {
|
||||
|
|
@ -55,6 +56,10 @@ impl<'a> Symbol for SelfSignedTlsCert<'a> {
|
|||
Ok(_) => Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn get_prerequisites(&self) -> Vec<Box<Resource>> {
|
||||
vec![Box::new(FileResource { path: self.get_key_path().into() })]
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue