Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Unified Diff: net/socket/ssl_client_socket_unittest.cc

Issue 2300533002: Stop caching DER-encoded certificates unnecessarily (Closed)
Patch Set: Remove debug Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/ssl_client_socket_impl.cc ('k') | net/socket/ssl_server_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_unittest.cc
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index cb320c77ba816ca3147fe7da382ede903667a1bc..19bc14c69006b68ad3f5df58f579dc12c3ea1909 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -2140,6 +2140,8 @@ TEST_F(SSLClientSocketTest, VerifyReturnChainProperlyOrdered) {
X509Certificate::FORMAT_AUTO);
ASSERT_EQ(3U, certs.size());
+ ASSERT_TRUE(certs[0]->Equals(unverified_certs[0].get()));
+
X509Certificate::OSCertHandles temp_intermediates;
temp_intermediates.push_back(certs[1]->os_cert_handle());
temp_intermediates.push_back(certs[2]->os_cert_handle());
@@ -2173,10 +2175,11 @@ TEST_F(SSLClientSocketTest, VerifyReturnChainProperlyOrdered) {
EXPECT_TRUE(LogContainsEndEvent(entries, -1, NetLog::TYPE_SSL_CONNECT));
SSLInfo ssl_info;
- sock_->GetSSLInfo(&ssl_info);
+ ASSERT_TRUE(sock_->GetSSLInfo(&ssl_info));
// Verify that SSLInfo contains the corrected re-constructed chain A -> B
// -> C2.
+ ASSERT_TRUE(ssl_info.cert);
const X509Certificate::OSCertHandles& intermediates =
ssl_info.cert->GetIntermediateCertificates();
ASSERT_EQ(2U, intermediates.size());
@@ -2188,6 +2191,7 @@ TEST_F(SSLClientSocketTest, VerifyReturnChainProperlyOrdered) {
certs[2]->os_cert_handle()));
// Verify that SSLInfo also contains the chain as received from the server.
+ ASSERT_TRUE(ssl_info.unverified_cert);
const X509Certificate::OSCertHandles& served_intermediates =
ssl_info.unverified_cert->GetIntermediateCertificates();
ASSERT_EQ(3U, served_intermediates.size());
« no previous file with comments | « net/socket/ssl_client_socket_impl.cc ('k') | net/socket/ssl_server_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698