aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2017-09-17 13:57:18 -0700
committerGitHub <[email protected]>2017-09-17 13:57:18 -0700
commitf0db1dbc958d57d61c6bd33811a289a3ed705c13 (patch)
tree39eed5e4cd860663df49ff784260941059790d26 /openssl/src
parentUpdate default client cipher list (diff)
parentopenssl: ecdh_tmp_callback doesn't work with libressl 2.6.1 (diff)
downloadrust-openssl-f0db1dbc958d57d61c6bd33811a289a3ed705c13.tar.xz
rust-openssl-f0db1dbc958d57d61c6bd33811a289a3ed705c13.zip
Merge pull request #695 from Keruspe/master
openssl-sys: support libressl 2.6.1
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/ssl/mod.rs2
-rw-r--r--openssl/src/ssl/tests/mod.rs6
2 files changed, 6 insertions, 2 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index dc0f5448..762118a5 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -652,6 +652,7 @@ impl SslContextBuilder {
/// Set the protocols to be used during Next Protocol Negotiation (the protocols
/// supported by the application).
+ #[cfg(not(libressl261))]
pub fn set_npn_protocols(&mut self, protocols: &[&[u8]]) -> Result<(), ErrorStack> {
// Firstly, convert the list of protocols to a byte-array that can be passed to OpenSSL
// APIs -- a list of length-prefixed strings.
@@ -1310,6 +1311,7 @@ impl SslRef {
///
/// The protocol's name is returned is an opaque sequence of bytes. It is up to the client
/// to interpret it.
+ #[cfg(not(libressl261))]
pub fn selected_npn_protocol(&self) -> Option<&[u8]> {
unsafe {
let mut data: *const c_uchar = ptr::null();
diff --git a/openssl/src/ssl/tests/mod.rs b/openssl/src/ssl/tests/mod.rs
index cfad9cca..a3ac6832 100644
--- a/openssl/src/ssl/tests/mod.rs
+++ b/openssl/src/ssl/tests/mod.rs
@@ -503,6 +503,7 @@ fn test_connect_with_unilateral_alpn() {
/// Tests that connecting with the client using NPN, but the server not does not
/// break the existing connection behavior.
#[test]
+#[cfg(not(libressl261))]
fn test_connect_with_unilateral_npn() {
let (_s, stream) = Server::new();
let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
@@ -615,6 +616,7 @@ fn test_connect_with_npn_successful_single_match() {
/// Tests that when the `SslStream` is created as a server stream, the protocols
/// are correctly advertised to the client.
#[test]
+#[cfg(not(libressl261))]
fn test_npn_server_advertise_multiple() {
let listener = TcpListener::bind("127.0.0.1:0").unwrap();
let localhost = listener.local_addr().unwrap();
@@ -1239,7 +1241,7 @@ fn tmp_dh_callback() {
}
#[test]
-#[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
+#[cfg(any(all(feature = "v101", ossl101, not(libressl261)), all(feature = "v102", ossl102)))]
fn tmp_ecdh_callback() {
use ec::EcKey;
use nid;
@@ -1306,7 +1308,7 @@ fn tmp_dh_callback_ssl() {
}
#[test]
-#[cfg(any(all(feature = "v101", ossl101), all(feature = "v102", ossl102)))]
+#[cfg(any(all(feature = "v101", ossl101, not(libressl261)), all(feature = "v102", ossl102)))]
fn tmp_ecdh_callback_ssl() {
use ec::EcKey;
use nid;