aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl/mod.rs
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <[email protected]>2017-09-17 19:46:05 +0200
committerMarc-Antoine Perennou <[email protected]>2017-09-17 19:46:05 +0200
commit50918303790805d75521ceeabe168e87eebbbd0f (patch)
treea9942247859a1d61645b687fac67b7ff46752afa /openssl/src/ssl/mod.rs
parentopensslè-sys: adjust some constants to libressl 2.6.1 (diff)
downloadrust-openssl-50918303790805d75521ceeabe168e87eebbbd0f.tar.xz
rust-openssl-50918303790805d75521ceeabe168e87eebbbd0f.zip
openssl: libressl 2.6.1 dropped suuport for npn
Signed-off-by: Marc-Antoine Perennou <[email protected]>
Diffstat (limited to 'openssl/src/ssl/mod.rs')
-rw-r--r--openssl/src/ssl/mod.rs2
1 files changed, 2 insertions, 0 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();