Skip to content

Commit 94aceaf

Browse files
authored
Merge pull request #116 from lancastr/master
Ignore error in add_cert on openssl
2 parents 6263163 + 9aaafdb commit 94aceaf

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ lazy_static = "1.0"
1717
libc = "0.2"
1818
tempfile = "3.0"
1919

20-
[target.'cfg(target_os = "android")'.dependencies]
21-
log = "0.4.5"
22-
2320
[target.'cfg(target_os = "windows")'.dependencies]
2421
schannel = "0.1.13"
2522

2623
[target.'cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios")))'.dependencies]
24+
log = "0.4.5"
2725
openssl = "0.10.15"
2826
openssl-sys = "0.9.30"
2927
openssl-probe = "0.1"

src/imp/openssl.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ impl TlsConnector {
263263
supported_protocols(builder.min_protocol, builder.max_protocol, &mut connector)?;
264264

265265
for cert in &builder.root_certificates {
266-
connector.cert_store_mut().add_cert((cert.0).0.clone())?;
266+
if let Err(err) = connector.cert_store_mut().add_cert((cert.0).0.clone()) {
267+
debug!("add_cert error: {:?}", err);
268+
}
267269
}
268270

269271
#[cfg(target_os = "android")]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ use std::fmt;
109109
use std::io;
110110
use std::result;
111111

112-
#[cfg(target_os = "android")]
112+
#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))]
113113
#[macro_use]
114114
extern crate log;
115115
#[cfg(any(target_os = "macos", target_os = "ios"))]

0 commit comments

Comments
 (0)