Add ALPN and signature algorithms to OpenSSL config

This commit is contained in:
Jan Andre Ikenmeyer 2019-11-29 20:32:12 +01:00
parent 69c7595a57
commit b811be764c
No known key found for this signature in database
GPG key ID: 28F9E42748DD95AE
7 changed files with 74 additions and 66 deletions

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use crate::connector::create_ssl_connector_builder;
use crate::connector::{create_tls_config, ALPN_H1};
use crate::cookie::Cookie;
use crate::fetch::methods::should_be_blocked_due_to_bad_port;
use crate::hosts::replace_host;
@ -167,8 +167,9 @@ impl<'a> Handler for Client<'a> {
WebSocketErrorKind::Protocol,
format!("Unable to parse domain from {}. Needed for SSL.", url),
))?;
let connector = create_ssl_connector_builder(&certs).build();
connector
let tls_config = create_tls_config(&certs, ALPN_H1);
tls_config
.build()
.connect(domain, stream)
.map_err(WebSocketError::from)
}