Add creating an introducer from a files

- Introducers can now be created by specifying a file. The certificate
  gets imported and declared as an introducer for the passed domains.
- Add some checks, so that the imported certificate can actually be used
  as an introducer (certificate is alive, not revoked, has certification
  capabilities)
This commit is contained in:
Malte Meiboom
2026-05-13 11:49:40 +02:00
parent 0df4c723d9
commit 4ddc3db6c0
5 changed files with 61 additions and 18 deletions
+9
View File
@@ -472,6 +472,15 @@ pub fn authenticate(context: &HuskContext, cert: &ValidCert, activate: bool, dom
Ok(())
}
pub fn has_certification_capability(cert: &ValidCert) -> bool {
cert.keys()
.for_certification()
.alive()
.supported()
.revoked(false)
.count() > 0
}
#[cfg(test)]
pub mod tests {