Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ rustdoc-args = ["--cfg", "docsrs"]
[features]
vendored = ["openssl/vendored"]
alpn = ["security-framework/alpn"]
force-openssl = ["openssl", "openssl-sys", "openssl-probe", "log"]

[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "watchos", target_os = "tvos"))'.dependencies]
security-framework = "2.0.0"
Expand All @@ -31,6 +32,13 @@ openssl = "0.10.29"
openssl-sys = "0.9.55"
openssl-probe = "0.1"

# Used when the force-openssl feature is enabled.
[dependencies]
log = { version = "0.4.5", optional = true }
openssl = { version = "0.10.29", optional = true }
openssl-sys = { version = "0.9.55", optional = true }
openssl-probe = { version = "0.1", optional = true }

[dev-dependencies]
tempfile = "3.0"
test-cert-gen = "0.9"
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,33 +104,33 @@ use std::fmt;
use std::io;
use std::result;

#[cfg(not(any(
#[cfg(any(feature = "force-openssl", not(any(
target_os = "macos",
target_os = "windows",
target_os = "ios",
target_os = "watchos",
target_os = "tvos"
)))]
))))]
#[macro_use]
extern crate log;
#[cfg(any(
#[cfg(all(not(feature = "force-openssl"), any(
target_os = "macos",
target_os = "ios",
target_os = "watchos",
target_os = "tvos"
))]
)))]
#[path = "imp/security_framework.rs"]
mod imp;
#[cfg(target_os = "windows")]
#[path = "imp/schannel.rs"]
mod imp;
#[cfg(not(any(
#[cfg(any(feature = "force-openssl", not(any(
target_os = "macos",
target_os = "windows",
target_os = "ios",
target_os = "watchos",
target_os = "tvos"
)))]
))))]
#[path = "imp/openssl.rs"]
mod imp;

Expand Down