Do the same error handling we do in ssl_write() in ssl_read().

This gets rid of print_ssl_errors() function.

Signed-off-by: Thiago Farina <tfarina@chromium.org>