Take the OpenSSL 1.1 codepath using SSL_is_server() instead of reaching inside the SSL struct. ok sthen (maintainer)