Import SSH revocation metadata
This commit is contained in:
parent
b9e7c61e67
commit
4c368253e4
11 changed files with 212 additions and 13 deletions
|
|
@ -149,6 +149,10 @@ pub enum ControlRequest {
|
|||
format: String,
|
||||
ca_public: Option<PathBuf>,
|
||||
},
|
||||
SshRevocationImport {
|
||||
path: PathBuf,
|
||||
format: String,
|
||||
},
|
||||
DbAdd {
|
||||
name: String,
|
||||
path: PathBuf,
|
||||
|
|
@ -328,6 +332,12 @@ pub enum ControlResponse {
|
|||
count: usize,
|
||||
note: String,
|
||||
},
|
||||
SshRevocationImported {
|
||||
revocations: Vec<SshRevocationEntry>,
|
||||
format: String,
|
||||
count: usize,
|
||||
note: String,
|
||||
},
|
||||
DbAdded {
|
||||
db: DbResource,
|
||||
},
|
||||
|
|
@ -477,6 +487,15 @@ mod tests {
|
|||
request
|
||||
);
|
||||
|
||||
let request = ControlRequest::SshRevocationImport {
|
||||
path: PathBuf::from("revocations.jsonl"),
|
||||
format: "jsonl".to_owned(),
|
||||
};
|
||||
assert_eq!(
|
||||
decode_request(&encode_request(&request).expect("encode")).expect("decode"),
|
||||
request
|
||||
);
|
||||
|
||||
let response = ControlResponse::SshRevocationExported {
|
||||
out: PathBuf::from("revocations.krl-spec"),
|
||||
format: "openssh-krl-spec".to_owned(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue