pub struct CertificateAuthority { /* private fields */ }Expand description
Manages the root CA and generates per-domain certificates.
Implementations§
Source§impl CertificateAuthority
impl CertificateAuthority
Sourcepub async fn new() -> Result<Self>
pub async fn new() -> Result<Self>
Load or create a CA certificate. Stores files under ~/.rustgate/.
Sourcepub async fn with_dir(dir: PathBuf) -> Result<Self>
pub async fn with_dir(dir: PathBuf) -> Result<Self>
Load or create a CA certificate in the specified directory.
Sourcepub fn ca_cert_path() -> Result<PathBuf>
pub fn ca_cert_path() -> Result<PathBuf>
Return the path to the CA PEM file for users to install.
Sourcepub async fn get_or_create_cert(
&self,
domain: &str,
) -> Result<Arc<CertifiedKey>>
pub async fn get_or_create_cert( &self, domain: &str, ) -> Result<Arc<CertifiedKey>>
Generate a fake certificate for the given domain, signed by the CA.
Auto Trait Implementations§
impl !Freeze for CertificateAuthority
impl !RefUnwindSafe for CertificateAuthority
impl Send for CertificateAuthority
impl Sync for CertificateAuthority
impl Unpin for CertificateAuthority
impl UnsafeUnpin for CertificateAuthority
impl !UnwindSafe for CertificateAuthority
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more