duke8253 commented on a change in pull request #8330:
URL: https://github.com/apache/trafficserver/pull/8330#discussion_r716807532
##########
File path: iocore/net/SSLSessionCache.cc
##########
@@ -326,8 +326,22 @@ SSLOriginSessionCache::insert_session(const std::string
&lookup_key, SSL_SESSION
Debug("ssl.origin_session_cache", "insert session: %s = %p",
lookup_key.c_str(), sess);
}
+ size_t len = i2d_SSL_SESSION(sess, nullptr); // make sure we're not going to
need more than SSL_MAX_ORIG_SESSION_SIZE bytes
+
+ /* do not cache a session that's too big. */
+ if (len > static_cast<size_t>(SSL_MAX_ORIG_SESSION_SIZE)) {
+ Debug("ssl.origin_session_cache.too_large", "Unable to save SSL session
because size of %zd exceeds the max of %d", len,
+ SSL_MAX_ORIG_SESSION_SIZE);
+ return;
+ }
Review comment:
yeah, I'll make the change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]