pub struct CertificateAuthority { /* private fields */ }Expand description
Issues certificates for use when communicating with clients.
Issues certificates for communicating with clients over TLS. Certificates are cached in memory up to a max size that is provided when creating the authority. Clients should be configured to either trust the provided root certificate, or to ignore certificate errors.
Implementations§
Source§impl CertificateAuthority
impl CertificateAuthority
pub fn gen_ca() -> Result<Certificate, RcgenError>
Sourcepub fn new(
private_key: PrivateKey,
ca_cert: Certificate,
ca_cert_string: String,
cache_size: u64,
) -> Result<CertificateAuthority, Error>
pub fn new( private_key: PrivateKey, ca_cert: Certificate, ca_cert_string: String, cache_size: u64, ) -> Result<CertificateAuthority, Error>
Attempts to create a new certificate authority.
This will fail if the provided key or certificate is invalid, or if the key does not match the certificate.
pub fn get_cert(&self) -> String
pub fn gen_server_config(self: Arc<Self>) -> Arc<ServerConfig>
Trait Implementations§
Source§impl Clone for CertificateAuthority
impl Clone for CertificateAuthority
Source§fn clone(&self) -> CertificateAuthority
fn clone(&self) -> CertificateAuthority
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ResolvesServerCert for CertificateAuthority
impl ResolvesServerCert for CertificateAuthority
Source§fn resolve(&self, client_hello: ClientHello<'_>) -> Option<Arc<CertifiedKey>>
fn resolve(&self, client_hello: ClientHello<'_>) -> Option<Arc<CertifiedKey>>
Choose a certificate chain and matching key given simplified
ClientHello information. Read more
Auto Trait Implementations§
impl Freeze for CertificateAuthority
impl !RefUnwindSafe for CertificateAuthority
impl Send for CertificateAuthority
impl Sync for CertificateAuthority
impl Unpin 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