mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 22:01:47 +03:00
make openssl the default on unix systems
This commit is contained in:
parent
4ad7ff3083
commit
16e26797d4
@ -63,6 +63,9 @@ path = "deps/fontconfig"
|
||||
optional = true
|
||||
version = "0.10"
|
||||
|
||||
[target.'cfg(not(windows))'.dependencies]
|
||||
openssl = "0.10"
|
||||
|
||||
# on linux, font-loader pulls in servo-font* crates which conflict with
|
||||
# our newer font related deps, so we avoid it on linux
|
||||
[target.'cfg(any(windows, target_os = "macos"))'.dependencies]
|
||||
@ -84,7 +87,6 @@ winapi = { version = "0.3", features = [
|
||||
[target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
|
||||
egli = "0.4"
|
||||
fontconfig = { path = "deps/fontconfig" }
|
||||
openssl = "0.10"
|
||||
x11 = {version ="2.18", features = ["xlib_xcb"]}
|
||||
|
||||
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies]
|
||||
|
@ -156,7 +156,7 @@ impl Client {
|
||||
Ok(Self::new(stream))
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "openssl", all(unix, not(target_os = "macos"))))]
|
||||
#[cfg(any(feature = "openssl", unix))]
|
||||
pub fn new_tls(config: &Arc<Config>) -> Fallible<Self> {
|
||||
use crate::server::listener::read_bytes;
|
||||
use openssl::ssl::{SslConnector, SslFiletype, SslMethod};
|
||||
@ -236,7 +236,7 @@ impl Client {
|
||||
Ok(Self::new(stream))
|
||||
}
|
||||
|
||||
#[cfg(not(any(feature = "openssl", all(unix, not(target_os = "macos")))))]
|
||||
#[cfg(not(any(feature = "openssl", unix)))]
|
||||
pub fn new_tls(config: &Arc<Config>) -> Fallible<Self> {
|
||||
use crate::server::listener::IdentitySource;
|
||||
use native_tls::TlsConnector;
|
||||
|
@ -79,7 +79,7 @@ pub fn read_bytes<T: AsRef<Path>>(path: T) -> Fallible<Vec<u8>> {
|
||||
Ok(buf)
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "openssl", all(unix, not(target_os = "macos"))))]
|
||||
#[cfg(any(feature = "openssl", unix))]
|
||||
fn pem_files_to_identity(
|
||||
key: PathBuf,
|
||||
cert: Option<PathBuf>,
|
||||
@ -126,7 +126,7 @@ fn pem_files_to_identity(
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(not(any(feature = "openssl", all(unix, not(target_os = "macos")))))]
|
||||
#[cfg(not(any(feature = "openssl", unix)))]
|
||||
fn pem_files_to_identity(
|
||||
_key: PathBuf,
|
||||
_cert: Option<PathBuf>,
|
||||
|
@ -29,7 +29,7 @@ impl ReadAndWrite for native_tls::TlsStream<std::net::TcpStream> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "openssl", all(unix, not(target_os = "macos"))))]
|
||||
#[cfg(any(feature = "openssl", unix))]
|
||||
impl ReadAndWrite for openssl::ssl::SslStream<std::net::TcpStream> {
|
||||
fn set_non_blocking(&self, non_blocking: bool) -> Fallible<()> {
|
||||
self.get_ref().set_nonblocking(non_blocking)?;
|
||||
@ -127,7 +127,7 @@ impl AsPollFd for native_tls::TlsStream<TcpStream> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "openssl", all(unix, not(target_os = "macos"))))]
|
||||
#[cfg(any(feature = "openssl", unix))]
|
||||
impl AsPollFd for openssl::ssl::SslStream<TcpStream> {
|
||||
fn as_poll_fd(&self) -> pollfd {
|
||||
self.get_ref().as_socket_descriptor().as_poll_fd()
|
||||
|
Loading…
Reference in New Issue
Block a user