Import SSH revocation metadata

This commit is contained in:
Eric Wendland 2026-05-18 11:56:42 +02:00
commit 4c368253e4
11 changed files with 212 additions and 13 deletions

View file

@ -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(),