mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Introduce create_ssl_context
This commit is contained in:
parent
e2e2d42e38
commit
7a4632bfa2
3 changed files with 15 additions and 8 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use brotli::Decompressor;
|
||||
use connector::{Connector, create_http_connector};
|
||||
use connector::{Connector, create_http_connector, create_ssl_context};
|
||||
use cookie;
|
||||
use cookie_storage::CookieStorage;
|
||||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg, HttpRequest as DevtoolsHttpRequest};
|
||||
|
@ -77,11 +77,12 @@ pub struct HttpState {
|
|||
|
||||
impl HttpState {
|
||||
pub fn new(certificate_path: &str) -> HttpState {
|
||||
let ssl_context = create_ssl_context(certificate_path);
|
||||
HttpState {
|
||||
hsts_list: Arc::new(RwLock::new(HstsList::new())),
|
||||
cookie_jar: Arc::new(RwLock::new(CookieStorage::new(150))),
|
||||
auth_cache: Arc::new(RwLock::new(AuthCache::new())),
|
||||
connector_pool: create_http_connector(certificate_path),
|
||||
connector_pool: create_http_connector(ssl_context),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue