Back to IOException instead of SSL exception.

The previous commit broke functionality, and instead of discarding it
I've decided to undo with a new commit for future references.

It would seem that IOException can be substitued by
SSLHandshakeException, but the previous commit proves it cannot.