Struct openssl::ssl::SslContextRef
source · pub struct SslContextRef(_);
Expand description
Reference to SslContext
Implementations
sourceimpl SslContextRef
impl SslContextRef
sourcepub fn certificate(&self) -> Option<&X509Ref>
pub fn certificate(&self) -> Option<&X509Ref>
Returns the certificate associated with this SslContext
, if present.
Requires OpenSSL 1.0.2 or newer.
This corresponds to SSL_CTX_get0_certificate
.
sourcepub fn private_key(&self) -> Option<&PKeyRef<Private>>
pub fn private_key(&self) -> Option<&PKeyRef<Private>>
Returns the private key associated with this SslContext
, if present.
Requires OpenSSL 1.0.2 or newer.
This corresponds to SSL_CTX_get0_privatekey
.
sourcepub fn cert_store(&self) -> &X509StoreRef
pub fn cert_store(&self) -> &X509StoreRef
Returns a shared reference to the certificate store used for verification.
This corresponds to SSL_CTX_get_cert_store
.
sourcepub fn extra_chain_certs(&self) -> &StackRef<X509>
pub fn extra_chain_certs(&self) -> &StackRef<X509>
Returns a shared reference to the stack of certificates making up the chain from the leaf.
This corresponds to SSL_CTX_get_extra_chain_certs
.
sourcepub fn ex_data<T>(&self, index: Index<SslContext, T>) -> Option<&T>
pub fn ex_data<T>(&self, index: Index<SslContext, T>) -> Option<&T>
Returns a reference to the extra data at the specified index.
This corresponds to SSL_CTX_get_ex_data
.
sourcepub fn max_early_data(&self) -> u32
pub fn max_early_data(&self) -> u32
Gets the maximum amount of early data that will be accepted on incoming connections.
Requires OpenSSL 1.1.1 or newer.
This corresponds to SSL_CTX_get_max_early_data
.