Embarrassingly, there is a bug in my verification callback support code which leads to RTS crashes: 1. `SSLContext` is created. 2. Verification callback is installed and allocated `FunPtr` is written to `ctxVfCb` `IORef`. 3. An `SSL` is created using the `SSLContext`. 4. The `SSLContext` is GCed and the finalizer calls `freeHaskellFunPtr`. 5. `connect` is called on the `SSL`. 6. KABOOM! Freed verification `FunPtr` is called. The solution is to keep a reference to the `SSLContext` in each `SSL` created from it. This prevents verification callback from deallocation, until there is no sessions left to call it.
…h ghc-7.0.4. FIXES #8
Export from Foreign.ForeignPtr deprecated as of GHC 7.5
…ationMode are now instances of Typeable.
…ffer, according to the OpenSSL docs
- write/tryWrite should throw EPIPE for cleanly-closed connections rather than EOF. - shutdown/tryShutdown shouldn't throw an exception when a remote peer sends us a "close notify" alert and closes the connection without waiting for our reply. - ProtocolError should contain an error message string.