Struct trust_dns::tls::TlsClientConnectionBuilder
[−]
[src]
pub struct TlsClientConnectionBuilder(_);
A builder for the TlsClientStream.
Methods
impl TlsClientConnectionBuilder
[src]
fn add_ca(&mut self, ca: OpensslX509)
Add a custom trusted peer certificate or certificate auhtority.
If this is the 'client' then the 'server' must have it associated as it's identity
, or have had the identity
signed by this certificate.
fn build(
self,
name_server: SocketAddr,
subject_name: String
) -> ClientResult<TlsClientConnection>
self,
name_server: SocketAddr,
subject_name: String
) -> ClientResult<TlsClientConnection>
Creates a new client connection.
Note this has side affects of establishing the connection to the specified DNS server and starting the event_loop. Expect this to change in the future.
Arguments
name_server
- IP and Port for the remote DNS resolversubject_name
- The Subject Public Key Info (SPKI) name as associated to a certificateloop_handle
- The reactor Core handle