Commit fd032019 authored by Neel Goyal's avatar Neel Goyal Committed by Facebook Github Bot 2

Add flag to indicate a session resumption attempt

Summary: Track when session resumption was attempted during connect

Reviewed By: shamdor-fb

Differential Revision: D3861028

fbshipit-source-id: 26ca41084faeeb64666b6833896b9510ef2b4c25
parent 8b030a19
...@@ -757,6 +757,7 @@ void AsyncSSLSocket::sslConn(HandshakeCB* callback, uint64_t timeout, ...@@ -757,6 +757,7 @@ void AsyncSSLSocket::sslConn(HandshakeCB* callback, uint64_t timeout,
applyVerificationOptions(ssl_); applyVerificationOptions(ssl_);
if (sslSession_ != nullptr) { if (sslSession_ != nullptr) {
sessionResumptionAttempted_ = true;
SSL_set_session(ssl_, sslSession_); SSL_set_session(ssl_, sslSession_);
SSL_SESSION_free(sslSession_); SSL_SESSION_free(sslSession_);
sslSession_ = nullptr; sslSession_ = nullptr;
......
...@@ -741,6 +741,10 @@ class AsyncSSLSocket : public virtual AsyncSocket { ...@@ -741,6 +741,10 @@ class AsyncSSLSocket : public virtual AsyncSocket {
return certCacheHit_; return certCacheHit_;
} }
bool sessionResumptionAttempted() const {
return sessionResumptionAttempted_;
}
private: private:
void init(); void init();
...@@ -895,6 +899,7 @@ class AsyncSSLSocket : public virtual AsyncSocket { ...@@ -895,6 +899,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
std::chrono::steady_clock::time_point handshakeStartTime_; std::chrono::steady_clock::time_point handshakeStartTime_;
std::chrono::steady_clock::time_point handshakeEndTime_; std::chrono::steady_clock::time_point handshakeEndTime_;
uint64_t handshakeConnectTimeout_{0}; uint64_t handshakeConnectTimeout_{0};
bool sessionResumptionAttempted_{false};
}; };
} // namespace } // namespace
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment