pub struct TlsCertificate {
pub name: Option<String>,
pub chain_certificates: Option<Vec<X509>>,
pub certificate: Option<(X509, PKey<Private>)>,
pub domains: Vec<String>,
pub info: Option<Certificate>,
pub hash_key: String,
pub is_ca: bool,
pub buffer_days: u16,
}Expand description
Represents a TLS certificate with its associated data
Fields§
§name: Option<String>§chain_certificates: Option<Vec<X509>>§certificate: Option<(X509, PKey<Private>)>§domains: Vec<String>§info: Option<Certificate>§hash_key: String§is_ca: bool§buffer_days: u16Implementations§
Source§impl TlsCertificate
impl TlsCertificate
Sourcepub fn get_self_signed_certificate(
&self,
server_name: &str,
) -> Result<Arc<SelfSignedCertificate>, Error>
pub fn get_self_signed_certificate( &self, server_name: &str, ) -> Result<Arc<SelfSignedCertificate>, Error>
Gets or creates a self-signed certificate for the given server name. If a cached certificate exists for the server name, returns that. Otherwise creates a new certificate signed by this CA.
§Arguments
server_name- The server name to create the certificate for
§Returns
An Arc containing the self-signed certificate
Trait Implementations§
Source§impl Clone for TlsCertificate
impl Clone for TlsCertificate
Source§fn clone(&self) -> TlsCertificate
fn clone(&self) -> TlsCertificate
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 Debug for TlsCertificate
impl Debug for TlsCertificate
Source§impl Default for TlsCertificate
impl Default for TlsCertificate
Source§fn default() -> TlsCertificate
fn default() -> TlsCertificate
Returns the “default value” for a type. Read more
Source§impl TryFrom<&CertificateConf> for TlsCertificate
impl TryFrom<&CertificateConf> for TlsCertificate
Auto Trait Implementations§
impl Freeze for TlsCertificate
impl RefUnwindSafe for TlsCertificate
impl Send for TlsCertificate
impl Sync for TlsCertificate
impl Unpin for TlsCertificate
impl UnsafeUnpin for TlsCertificate
impl UnwindSafe for TlsCertificate
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> 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<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request