Permalink
Browse files

Improve the error handling in OpenSSL.Session

  - 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.
  • Loading branch information...
1 parent 022bbd9 commit bf0f7deee41951f32b94550a3b81ee2796c2632d @depressed-pho depressed-pho committed Nov 15, 2011
Showing with 101 additions and 165 deletions.
  1. +7 −1 NEWS
  2. +94 −164 OpenSSL/Session.hsc
View
8 NEWS
@@ -5,9 +5,15 @@ Changes from 0.10.1.1 to ?
* Applied a patch by Mikhail Vorozhtsov:
- Moved all EVP-related private functions to OpenSSL.EVP.Internal.
-* Fixed erroneous error handling in OpenSSL.Session:
+* Improve the error handling in OpenSSL.Session:
- SSL_get_error() must be called within the OS thread which caused
the failed operation as it inspects the thread-local storage.
+ - 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.
Changes from 0.10.1 to 0.10.1.1
Oops, something went wrong.

0 comments on commit bf0f7de

Please sign in to comment.