While debugging some unrelated linkage problem, I noticed the following error output;
The error message appears not very helpful and that we can improve on.
When receiving a libevent openssl-error, we do not check the error code but pass it on to openssl for retrieving an error string – this is not ideal considering that openssl does signal more;
The error code 5, which actually means SSL_ERROR_SYSCALL does hint that we should now check errno for more information on the problem. We should only ever invoke openssl's error string generator when we did receive a SSL_ERROR_SSL.