From 8830bd5daf3100039a767bfacefdc15d9fea05f4 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 5 Nov 2017 10:47:05 -0800 Subject: [PATCH] Add a couple of FIXMEs --- openssl/src/ssl/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 62b617a9..d3a5e428 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -368,6 +368,7 @@ impl SslContextBuilder { /// registers a verification callback. pub fn set_verify_callback(&mut self, mode: SslVerifyMode, verify: F) where + // FIXME should take a mutable reference to the store F: Fn(bool, &X509StoreContextRef) -> bool + Any + 'static + Sync + Send, { unsafe { @@ -1136,6 +1137,7 @@ impl SslRef { /// chain is valid and `false` otherwise. pub fn set_verify_callback(&mut self, mode: SslVerifyMode, verify: F) where + // FIXME should take a mutable reference to the x509 store F: Fn(bool, &X509StoreContextRef) -> bool + Any + 'static + Sync + Send, { unsafe { @@ -1649,6 +1651,7 @@ impl MidHandshakeSslStream { /// A stream wrapper which handles SSL encryption for an underlying stream. pub struct SslStream { + // FIXME use ManuallyDrop ssl: Ssl, _method: BioMethod, // NOTE: this *must* be after the Ssl field so things drop right _p: PhantomData, @@ -1699,6 +1702,7 @@ impl SslStream { Ok(ret as usize) } else { match self.make_error(ret) { + // FIXME only do this in read // Don't treat unexpected EOFs as errors when reading Error::Stream(ref e) if e.kind() == io::ErrorKind::ConnectionAborted => Ok(0), e => Err(e),