diff options
| author | Steven Fackler <[email protected]> | 2017-01-22 18:39:34 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-01-22 18:39:34 +0000 |
| commit | 722bdb6a4c6d84657f5b67db86c201821fe5e0b9 (patch) | |
| tree | dc1d61cff415f507c27478ad578b43e4573101f8 | |
| parent | Merge pull request #562 from sfackler/named-curve (diff) | |
| parent | libressl: make set_ecdh_auto available (diff) | |
| download | rust-openssl-722bdb6a4c6d84657f5b67db86c201821fe5e0b9.tar.xz rust-openssl-722bdb6a4c6d84657f5b67db86c201821fe5e0b9.zip | |
Merge pull request #550 from Keruspe/master
LibreSSL support improvements
| -rw-r--r-- | openssl-sys/src/lib.rs | 10 | ||||
| -rw-r--r-- | openssl/src/ssl/mod.rs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 970539d7..34bdb9e0 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1266,15 +1266,15 @@ pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: c_int = 45; pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53; pub const X509_V_OK: c_int = 0; -#[cfg(not(ossl101))] +#[cfg(not(any(ossl101, libressl)))] pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: c_uint = 0x1; -#[cfg(not(ossl101))] +#[cfg(not(any(ossl101, libressl)))] pub const X509_CHECK_FLAG_NO_WILDCARDS: c_uint = 0x2; -#[cfg(not(ossl101))] +#[cfg(not(any(ossl101, libressl)))] pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: c_uint = 0x4; -#[cfg(not(ossl101))] +#[cfg(not(any(ossl101, libressl)))] pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: c_uint = 0x8; -#[cfg(not(ossl101))] +#[cfg(not(any(ossl101, libressl)))] pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: c_uint = 0x10; pub const GEN_OTHERNAME: c_int = 0; diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 2fc7605a..dd7f72cc 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -828,12 +828,12 @@ impl SslContextBuilder { /// Enables ECDHE key exchange with an automatically chosen curve list. /// /// Requires the `v102` feature and OpenSSL 1.0.2. - #[cfg(all(feature = "v102", ossl102))] + #[cfg(all(feature = "v102", any(ossl102, libressl)))] pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> { self._set_ecdh_auto(onoff) } - #[cfg(ossl102)] + #[cfg(any(ossl102,libressl))] fn _set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> { unsafe { cvt(ffi::SSL_CTX_set_ecdh_auto(self.as_ptr(), onoff as c_int)).map(|_| ()) } } |