SSL: X509 was made opaque in OpenSSL 1.1.0. To increment reference counters we now use newly introduced X509_up_ref() function.