[control] Domi CA and UI sign-in: intermediate renewal by CSR with manual offline signing, domi host certificates, device requests approved by code, one-time PKCS#12 installs, revocation; Remote-User trusted only with edge's per-boot proof
This commit is contained in:
@@ -116,7 +116,16 @@ mod unix {
|
||||
let r2 = env
|
||||
.call("GET", &format!("/api/v1/pki-requests/{rid}/csr"), None)
|
||||
.await;
|
||||
assert_eq!(r2.status, 200);
|
||||
assert_eq!(
|
||||
r2.status,
|
||||
200,
|
||||
"{}
|
||||
{}
|
||||
{}",
|
||||
r.text,
|
||||
r2.text,
|
||||
env.control_log()
|
||||
);
|
||||
assert_eq!(r2.text, csr);
|
||||
let signed = pki::sign_intermediate(&off.root_pem, &off.root_key, &csr, now()).unwrap();
|
||||
let f = env.dir.join("signed.crt");
|
||||
@@ -170,7 +179,8 @@ mod unix {
|
||||
i64::from(pki::SERVER_DAYS) - 1
|
||||
);
|
||||
|
||||
// No root key anywhere control writes.
|
||||
// No root key anywhere control writes. (The start of a P-256 PKCS#8 body is the same
|
||||
// for every key, so the unique end is compared.)
|
||||
let key_pem = off.root_key.serialize_pem();
|
||||
let body: String = key_pem
|
||||
.lines()
|
||||
@@ -181,7 +191,7 @@ mod unix {
|
||||
let bytes = std::fs::read(&f).unwrap();
|
||||
let text = String::from_utf8_lossy(&bytes);
|
||||
assert!(
|
||||
!text.contains(&body[..40]),
|
||||
!text.contains(&body[body.len() - 40..]),
|
||||
"root key material in {}",
|
||||
f.display()
|
||||
);
|
||||
@@ -407,7 +417,7 @@ mod unix {
|
||||
let p = e.path();
|
||||
if p.is_dir() {
|
||||
stack.push(p);
|
||||
} else {
|
||||
} else if p.is_file() {
|
||||
out.push(p);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user