diff options
| author | Steven Fackler <[email protected]> | 2017-11-05 10:47:05 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2017-11-05 10:47:05 -0800 |
| commit | 8830bd5daf3100039a767bfacefdc15d9fea05f4 (patch) | |
| tree | 4a05164a774f70393bd31d79c0f6379d9caf43bb /openssl/src | |
| parent | Merge pull request #764 from AndyGauge/doc-error (diff) | |
| download | rust-openssl-8830bd5daf3100039a767bfacefdc15d9fea05f4.tar.xz rust-openssl-8830bd5daf3100039a767bfacefdc15d9fea05f4.zip | |
Add a couple of FIXMEs
Diffstat (limited to 'openssl/src')
| -rw-r--r-- | openssl/src/ssl/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<F>(&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<F>(&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<S> MidHandshakeSslStream<S> { /// A stream wrapper which handles SSL encryption for an underlying stream. pub struct SslStream<S> { + // FIXME use ManuallyDrop ssl: Ssl, _method: BioMethod, // NOTE: this *must* be after the Ssl field so things drop right _p: PhantomData<S>, @@ -1699,6 +1702,7 @@ impl<S: Read + Write> SslStream<S> { 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), |