This will avoid this icky error:
$ https-client -4 -url https://127.1
some request failed - no idea which one though!
error:00000005:lib(0):func(0):DH lib
And instead will report only:
$ https-client -4 -url https://127.1
some request failed - no idea which one though!
socket error = Connection refused (111)
Refs: #1115
This patch splits common part out to avoid copy-paste from the
- bufferevent_openssl.c
- bufferevent_mbedtls.c
It uses VFS/bufferevent-like approach, i.e. structure of callbacks.