32 throw std::runtime_error(
"SSL_SESSION is null");
43 reinterpret_cast<const unsigned char*
>(serializedSession.data());
44 auto longLen = long(serializedSession.length());
45 if ((
session_ = d2i_SSL_SESSION(
nullptr, &sessionData, longLen)) ==
nullptr) {
46 throw std::runtime_error(
"Cannot deserialize SSLSession string");
58 auto len = i2d_SSL_SESSION(
session_,
nullptr);
61 std::unique_ptr<unsigned char[]> uptr(
new unsigned char[
size_t(len)]);
63 auto written = i2d_SSL_SESSION(
session_, &p);
65 VLOG(2) <<
"Could not serialize SSL_SESSION!";
67 ret.assign(uptr.get(), uptr.get() + written);
76 const unsigned char*
ptr =
nullptr;
78 ptr = SSL_SESSION_get_id(
session_, &len);
79 ret.assign(ptr, ptr + len);
85 return const_cast<SSL_SESSION*
>(
session_);
SSLSessionImpl(SSL_SESSION *session, bool takeOwnership=true)
std::string serialize() const
—— Concurrent Priority Queue Implementation ——
SSL_SESSION * getRawSSLSessionDangerous()
const SSL_SESSION * getRawSSLSession() const
virtual ~SSLSessionImpl()
std::string getSessionID() const