void AsyncSSLSocket::setSSLSession(SSL_SESSION* session, bool takeOwnership) {
  if (sslSession_) {
    SSL_SESSION_free(sslSession_);
  }
  sslSession_ = session;
  if (!takeOwnership && session != nullptr) {
    // Increment the reference count
    // This API exists in BoringSSL and OpenSSL 1.1.0
    SSL_SESSION_up_ref(session);
  }
}
void AsyncSSLSocket::setSSLSession(SSL_SESSION* session, bool takeOwnership) {
  if (sslSession_) {
    SSL_SESSION_free(sslSession_);
  }
  sslSession_ = session;
  if (!takeOwnership && session != nullptr) {
     
     
    SSL_SESSION_up_ref(session);
  }
}