Fixed bug with SSL domain verification.

This commit is contained in:
Aaron Weiss 2017-06-21 23:35:00 -04:00
parent b277db71e0
commit 536521e349
No known key found for this signature in database
GPG key ID: 0237035D9BF03AE2
2 changed files with 1 additions and 2 deletions

View file

@ -8,7 +8,6 @@ fn main() {
nickname: Some("pickles".to_owned()),
server: Some("irc.fyrechat.net".to_owned()),
channels: Some(vec!["#irc-crate".to_owned()]),
port: Some(6697),
use_ssl: Some(true),
..Default::default()
};

View file

@ -104,7 +104,7 @@ impl Connection {
if config.use_mock_connection() {
Ok(ConnectionFuture::Mock(config))
} else if config.use_ssl() {
let domain = format!("{}:{}", config.server(), config.port());
let domain = format!("{}", config.server());
let mut builder = TlsConnector::builder()?;
if let Some(cert_path) = config.cert_path() {
let mut file = File::open(cert_path)?;