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

Unified Diff: net/socket/ssl_client_socket_openssl_unittest.cc

Issue 845753002: Call EnsureNSSInit in SSLClientSocket::GetMaxSupportedSSLVersion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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_nss.cc ('k') | net/socket/ssl_client_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_openssl_unittest.cc
diff --git a/net/socket/ssl_client_socket_openssl_unittest.cc b/net/socket/ssl_client_socket_openssl_unittest.cc
index 1c226bdd2acd6ca8e406818bea2f8eb8633aa11c..ba45a0cbfcedaed698d178d51da41d69c6685e07 100644
--- a/net/socket/ssl_client_socket_openssl_unittest.cc
+++ b/net/socket/ssl_client_socket_openssl_unittest.cc
@@ -50,8 +50,6 @@ namespace {
// These client auth tests are currently dependent on OpenSSL's struct X509.
#if defined(USE_OPENSSL_CERTS)
-const SSLConfig kDefaultSSLConfig;
-
// Loads a PEM-encoded private key file into a scoped EVP_PKEY object.
// |filepath| is the private key file path.
// |*pkey| is reset to the new EVP_PKEY on success, untouched otherwise.
@@ -154,7 +152,7 @@ class SSLClientSocketOpenSSLClientAuthTest : public PlatformTest {
// Returns true on succes, false otherwise. Success means that the socket
// could be created and its Connect() was called, not that the connection
// itself was a success.
- bool CreateAndConnectSSLClientSocket(SSLConfig& ssl_config,
+ bool CreateAndConnectSSLClientSocket(const SSLConfig& ssl_config,
int* result) {
sock_ = CreateSSLClientSocket(transport_.Pass(),
test_server_->host_port_pair(),
@@ -200,10 +198,9 @@ TEST_F(SSLClientSocketOpenSSLClientAuthTest, NoCert) {
ASSERT_TRUE(ConnectToTestServer(ssl_options));
base::FilePath certs_dir = GetTestCertsDirectory();
- SSLConfig ssl_config = kDefaultSSLConfig;
int rv;
- ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv));
+ ASSERT_TRUE(CreateAndConnectSSLClientSocket(SSLConfig(), &rv));
EXPECT_EQ(ERR_SSL_CLIENT_AUTH_CERT_NEEDED, rv);
EXPECT_FALSE(sock_->IsConnected());
@@ -220,7 +217,7 @@ TEST_F(SSLClientSocketOpenSSLClientAuthTest, SendEmptyCert) {
ASSERT_TRUE(ConnectToTestServer(ssl_options));
base::FilePath certs_dir = GetTestCertsDirectory();
- SSLConfig ssl_config = kDefaultSSLConfig;
+ SSLConfig ssl_config;
ssl_config.send_client_cert = true;
ssl_config.client_cert = NULL;
@@ -242,7 +239,7 @@ TEST_F(SSLClientSocketOpenSSLClientAuthTest, SendGoodCert) {
ASSERT_TRUE(ConnectToTestServer(ssl_options));
base::FilePath certs_dir = GetTestCertsDirectory();
- SSLConfig ssl_config = kDefaultSSLConfig;
+ SSLConfig ssl_config;
ssl_config.send_client_cert = true;
ssl_config.client_cert = ImportCertFromFile(certs_dir, "client_1.pem");
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698