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:
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user