diff --git a/Cargo.toml b/Cargo.toml index 3010f0c..73a9821 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ log = "0.3" rustc-serialize = "0.3" rust-crypto = "0.2" bufstream = "0.1" +openssl = "0.6" email = "*" [dev-dependencies] diff --git a/src/authentication.rs b/src/authentication.rs index 6404ad1..c7a4326 100644 --- a/src/authentication.rs +++ b/src/authentication.rs @@ -10,7 +10,7 @@ //! Provides authentication mecanisms use std::fmt::{Display, Formatter}; -use std::fmt::Result as FmtResult; +use std::fmt; use serialize::base64::{self, ToBase64, FromBase64}; use serialize::hex::ToHex; @@ -33,7 +33,7 @@ pub enum Mecanism { } impl Display for Mecanism { - fn fmt(&self, f: &mut Formatter) -> FmtResult { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "{}", match *self { Mecanism::Plain => "PLAIN", diff --git a/src/client/net.rs b/src/client/net.rs index 601c975..c3cc3c8 100644 --- a/src/client/net.rs +++ b/src/client/net.rs @@ -13,6 +13,8 @@ use std::io; use std::net::SocketAddr; use std::net::TcpStream; +use openssl::ssl::{SslContext, SslStream}; + /// A trait for the concept of opening a stream pub trait Connector { /// Opens a connection to the given IP socket diff --git a/src/extension.rs b/src/extension.rs index a72eb5b..22f6496 100644 --- a/src/extension.rs +++ b/src/extension.rs @@ -11,7 +11,7 @@ use std::result::Result; use std::fmt::{Display, Formatter}; -use std::fmt::Result as FmtResult; +use std::fmt; use std::collections::HashSet; use response::Response; @@ -38,7 +38,7 @@ pub enum Extension { } impl Display for Extension { - fn fmt(&self, f: &mut Formatter) -> FmtResult { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "{}", match *self { Extension::EightBitMime => "8BITMIME", @@ -64,7 +64,7 @@ pub struct ServerInfo { } impl Display for ServerInfo { - fn fmt(&self, f: &mut Formatter) -> FmtResult { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "{} with {}", self.name, match self.esmtp_features.is_empty() { diff --git a/src/lib.rs b/src/lib.rs index 3a92751..66c2a7c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -147,6 +147,7 @@ extern crate time; extern crate uuid; extern crate email as email_format; extern crate bufstream; +extern crate openssl; mod extension; pub mod client;