Compare commits

...

6 Commits

Author SHA1 Message Date
Alexis Mousset
9d61e6ec1f 0.6.3 release 2020-10-21 21:06:20 +02:00
Pyry Kontio
7f8c13910d Bump openssl major version: 0.9 -> 0.10. Leaving the range to continue including 0.9, so this is a patch-level bump. Bump lettre patch version to 0.6.3. 2020-10-21 21:03:03 +02:00
Alexis Mousset
364e40f5d9 Bump to v0.6.2 2017-02-18 18:28:36 +01:00
Alexis Mousset
cb08bc5527 feat(all): Update uuid crate to 0.4 2017-02-18 18:24:25 +01:00
Alexis Mousset
6c7c3ba9fa feat(all): Update env_logger 2017-02-18 18:24:13 +01:00
Zack Mullaly
53e79c0ac4 feat(transport): Upgrade to OpenSSL ^0.9 2017-02-18 18:23:21 +01:00
5 changed files with 43 additions and 20 deletions

View File

@@ -1,3 +1,16 @@
### v0.6.3 (2022-1--21)
* **transport**: Allow using openssl 0.10
### v0.6.2 (2017-02-18)
#### Features
* **all**
* Update uuid crate to 0.4
* Update env-logger crate to 0.4
* Update openssl crate to 0.9
### v0.6.1 (2016-10-19)
#### Features

View File

@@ -1,7 +1,7 @@
[package]
name = "lettre"
version = "0.6.1"
version = "0.6.3"
description = "Email client"
readme = "README.md"
documentation = "https://lettre.github.io/lettre/"
@@ -11,18 +11,18 @@ authors = ["Alexis Mousset <contact@amousset.me>"]
keywords = ["email", "smtp", "mailer"]
[dependencies]
bufstream = "0.1"
email = "0.0"
log = "0.3"
mime = "0.2"
openssl = "0.8"
rustc-serialize = "0.3"
rust-crypto = "0.2"
time = "0.1"
uuid = { version = "0.3", features = ["v4"] }
bufstream = "^0.1"
email = "^0.0"
log = "^0.3"
mime = "^0.2"
openssl = "> 0.9, < 0.11"
rustc-serialize = "^0.3"
rust-crypto = "^0.2"
time = "^0.1"
uuid = { version = "^0.4", features = ["v4"] }
[dev-dependencies]
env_logger = "0.3"
env_logger = "^0.4"
[features]
unstable = []

View File

@@ -22,6 +22,8 @@ Lettre provides the following features:
Released versions:
* [latest](https://lettre.github.io/lettre/)
* [v0.6.3](https://lettre.github.io/lettre/v0.6.3/lettre/)
* [v0.6.2](https://lettre.github.io/lettre/v0.6.2/lettre/)
* [v0.6.1](https://lettre.github.io/lettre/v0.6.1/lettre/)
* [v0.6.0](https://lettre.github.io/lettre/v0.6.0/lettre/)
* [v0.5.1](https://lettre.github.io/lettre/v0.5.1/lettre/)

View File

@@ -1,7 +1,6 @@
//! A trait to represent a stream
use openssl::ssl::{SslContext, SslStream};
use openssl::ssl::{Ssl, SslContext, SslStream};
use std::fmt;
use std::fmt::{Debug, Formatter};
use std::io;
@@ -24,9 +23,13 @@ impl Connector for NetworkStream {
match ssl_context {
Some(context) => {
match SslStream::connect(context, tcp_stream) {
Ok(stream) => Ok(NetworkStream::Ssl(stream)),
Err(err) => Err(io::Error::new(ErrorKind::Other, err)),
match Ssl::new(context) {
Ok(ssl) => {
ssl.connect(tcp_stream)
.map(|s| NetworkStream::Ssl(s))
.map_err(|e| io::Error::new(ErrorKind::Other, e))
}
Err(e) => Err(io::Error::new(ErrorKind::Other, e)),
}
}
None => Ok(NetworkStream::Plain(tcp_stream)),
@@ -37,9 +40,14 @@ impl Connector for NetworkStream {
*self = match *self {
NetworkStream::Plain(ref mut stream) => {
match SslStream::connect(ssl_context, stream.try_clone().unwrap()) {
Ok(ssl_stream) => NetworkStream::Ssl(ssl_stream),
Err(err) => return Err(io::Error::new(ErrorKind::Other, err)),
match Ssl::new(ssl_context) {
Ok(ssl) => {
match ssl.connect(stream.try_clone().unwrap()) {
Ok(ssl_stream) => NetworkStream::Ssl(ssl_stream),
Err(err) => return Err(io::Error::new(ErrorKind::Other, err)),
}
}
Err(e) => return Err(io::Error::new(ErrorKind::Other, e)),
}
}
NetworkStream::Ssl(_) => return Ok(()),

View File

@@ -98,7 +98,7 @@ impl SmtpTransportBuilder {
Some(addr) => {
Ok(SmtpTransportBuilder {
server_addr: addr,
ssl_context: SslContext::new(SslMethod::Tlsv1).unwrap(),
ssl_context: SslContext::builder(SslMethod::tls()).unwrap().build(),
security_level: SecurityLevel::Opportunistic,
smtp_utf8: false,
credentials: None,