aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-06-29 21:58:54 -0700
committerSteven Fackler <[email protected]>2015-06-29 21:58:54 -0700
commitdfacea1df693e9c3ec3eadafa9c96a0e1ddd3839 (patch)
treece99ee966cb61391ab41ac1947ec52fc841aa877
parentInitialize FEATURES again in travis config (diff)
downloadrust-openssl-dfacea1df693e9c3ec3eadafa9c96a0e1ddd3839.tar.xz
rust-openssl-dfacea1df693e9c3ec3eadafa9c96a0e1ddd3839.zip
Fix build with alpn feature
-rw-r--r--openssl/src/ssl/mod.rs2
-rw-r--r--openssl/src/ssl/tests.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index d67dc1a2..cf885201 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -1253,7 +1253,7 @@ impl<S: Read+Write> SslStream<S> {
/// This method needs the `alpn` feature.
#[cfg(feature = "alpn")]
pub fn get_selected_alpn_protocol(&self) -> Option<&[u8]> {
- self.ssl.get_selected_alpn_protocol()
+ self.kind.ssl().get_selected_alpn_protocol()
}
/// pending() takes into account only bytes from the TLS/SSL record that is currently being processed (if any).
diff --git a/openssl/src/ssl/tests.rs b/openssl/src/ssl/tests.rs
index b44b9c35..8401836d 100644
--- a/openssl/src/ssl/tests.rs
+++ b/openssl/src/ssl/tests.rs
@@ -579,7 +579,7 @@ fn test_npn_server_advertise_multiple() {
#[test]
#[cfg(feature = "alpn")]
fn test_alpn_server_advertise_multiple() {
- let localhost = "127.0.0.1:15420";
+ let localhost = "127.0.0.1:15421";
let listener = TcpListener::bind(localhost).unwrap();
// We create a different context instance for the server...
let listener_ctx = {
@@ -595,7 +595,7 @@ fn test_alpn_server_advertise_multiple() {
// Have the listener wait on the connection in a different thread.
thread::spawn(move || {
let (stream, _) = listener.accept().unwrap();
- let _ = SslStream::new_server(&listener_ctx, stream).unwrap();
+ let _ = SslStream::accept(&listener_ctx, stream).unwrap();
});
let mut ctx = SslContext::new(Sslv23).unwrap();