cotag / ruby-tls

Generic TLS for ruby
Other
6 stars 5 forks source link

Feature Request: Specify Error in #close_cb #9

Open HoneyryderChuck opened 7 years ago

HoneyryderChuck commented 7 years ago

Currently #close_cb is being used as general purpose callback for when something wrong happens and ssl session terminates. This "something wrong" are, from what I saw, standard SSL/TLS errors, and could be handled differently, in a more "ruby way".

My proposal would be: wrap those errors into exception objects (the equivalent to OpenSSL::SSL::SSLError, hopefully with better error messages). After that, one would have two options: