Trait tls_api::TlsAcceptorType[][src]

pub trait TlsAcceptorType: Debug + Display + Sync + 'static {
    fn implemented(&self) -> bool;
fn supports_alpn(&self) -> bool;
fn supports_der_keys(&self) -> bool;
fn supports_pkcs12_keys(&self) -> bool;
fn info(&self) -> ImplInfo;
fn builder_from_der_key(
        &self,
        cert: &[u8],
        key: &[u8]
    ) -> Result<TlsAcceptorBuilderBox>;
fn builder_from_pkcs12(
        &self,
        pkcs12: &[u8],
        passphrase: &str
    ) -> Result<TlsAcceptorBuilderBox>; }

Similar to TlsAcceptor, but it is dynamic, does not require type parameter.

This can be obtained with TlsAcceptor::TYPE_DYN.

Required methods

fn implemented(&self) -> bool[src][]

Whether this acceptor type is implemented.

For example, tls-api-security-framework is available on Linux, but all operations result in error, so implemented() returns false for that implementation.

fn supports_alpn(&self) -> bool[src][]

Whether this implementation supports ALPN negotiation.

fn supports_der_keys(&self) -> bool[src][]

Whether this implementation supports construction of acceptor using a pair of a DER certificate and file pair.

fn supports_pkcs12_keys(&self) -> bool[src][]

Whether this implementation supports construction of acceptor using PKCS #12 file.

fn info(&self) -> ImplInfo[src][]

Unspecified version information about this implementation.

fn builder_from_der_key(
    &self,
    cert: &[u8],
    key: &[u8]
) -> Result<TlsAcceptorBuilderBox>
[src][]

New builder from given server key.

This operation is guaranteed to fail if not TlsAcceptorType::supports_der_keys.

fn builder_from_pkcs12(
    &self,
    pkcs12: &[u8],
    passphrase: &str
) -> Result<TlsAcceptorBuilderBox>
[src][]

New builder from given server key.

This operation is guaranteed to fail if not TlsAcceptorType::supports_pkcs12_keys.

Implementors