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_http_client, Connector};
use crate::connector::{create_http_client, Connector, TlsConfig};
use crate::cookie;
use crate::cookie_storage::CookieStorage;
use crate::decoder::Decoder;
@ -46,7 +46,6 @@ use net_traits::{CookieSource, FetchMetadata, NetworkError, ReferrerPolicy};
use net_traits::{
RedirectEndValue, RedirectStartValue, ResourceAttribute, ResourceFetchTiming, ResourceTimeValue,
};
use openssl::ssl::SslConnectorBuilder;
use servo_arc::Arc;
use servo_url::{ImmutableOrigin, ServoUrl};
use std::collections::{HashMap, HashSet};
@ -90,7 +89,7 @@ pub struct HttpState {
}
impl HttpState {
pub fn new(ssl_connector_builder: SslConnectorBuilder) -> HttpState {
pub fn new(tls_config: TlsConfig) -> HttpState {
HttpState {
hsts_list: RwLock::new(HstsList::new()),
cookie_jar: RwLock::new(CookieStorage::new(150)),
@ -98,7 +97,7 @@ impl HttpState {
history_states: RwLock::new(HashMap::new()),
http_cache: RwLock::new(HttpCache::new()),
http_cache_state: Mutex::new(HashMap::new()),
client: create_http_client(ssl_connector_builder, HANDLE.lock().unwrap().executor()),
client: create_http_client(tls_config, HANDLE.lock().unwrap().executor()),
}
}
}