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

Unified Diff: net/socket/ssl_server_socket_unittest.cc

Issue 2300533002: Stop caching DER-encoded certificates unnecessarily (Closed)
Patch Set: More feedback Created 4 years, 4 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
Index: net/socket/ssl_server_socket_unittest.cc
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc
index d390c1b80cad4f28bcb17b8d02962b7d9b9d1b28..0fb782fbeb8106c62a734e3b578a2a4ee9473bda 100644
--- a/net/socket/ssl_server_socket_unittest.cc
+++ b/net/socket/ssl_server_socket_unittest.cc
@@ -396,12 +396,10 @@ class SSLServerSocketTest : public PlatformTest {
// Certificate provided by the host doesn't need authority.
SSLConfig::CertAndStatus cert_and_status;
+ cert_and_status.cert = server_cert_;
cert_and_status.cert_status = CERT_STATUS_AUTHORITY_INVALID;
- std::string server_cert_der;
- ASSERT_TRUE(X509Certificate::GetDEREncoded(server_cert_->os_cert_handle(),
- &server_cert_der));
- cert_and_status.der_cert = server_cert_der;
- client_ssl_config_.allowed_bad_certs.push_back(cert_and_status);
+ client_ssl_config_.allowed_bad_certs.emplace_back(
davidben 2016/09/01 19:44:40 Ditto.
+ std::move(cert_and_status));
}
protected:

Powered by Google App Engine
This is Rietveld 408576698