Index: remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc |
diff --git a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc |
index 7688c166f52b65e53b7915f1e8aefc8dece85779..fbfdd00c442403cd1182bac53c01ba4ab5155035 100644 |
--- a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc |
+++ b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc |
@@ -152,10 +152,10 @@ class SslHmacChannelAuthenticatorTest : public testing::Test { |
// Verify that a channel can be connected using a valid shared secret. |
TEST_F(SslHmacChannelAuthenticatorTest, SuccessfulAuth) { |
- client_auth_ = SslHmacChannelAuthenticator::CreateForClient( |
- host_cert_, kTestSharedSecret); |
- host_auth_ = SslHmacChannelAuthenticator::CreateForHost( |
- host_cert_, key_pair_, kTestSharedSecret); |
+ client_auth_ = |
+ SslHmacChannelAuthenticator::CreateForClient(kTestSharedSecret); |
+ host_auth_ = SslHmacChannelAuthenticator::CreateForHost(host_cert_, key_pair_, |
+ kTestSharedSecret); |
RunChannelAuth(net::OK, net::OK); |
@@ -170,10 +170,10 @@ TEST_F(SslHmacChannelAuthenticatorTest, SuccessfulAuth) { |
tester.CheckResults(); |
} |
-// Verify that channels cannot be using invalid shared secret. |
+// Verify that channels cannot be connected using invalid shared secret. |
TEST_F(SslHmacChannelAuthenticatorTest, InvalidChannelSecret) { |
- client_auth_ = SslHmacChannelAuthenticator::CreateForClient( |
- host_cert_, kTestSharedSecretBad); |
+ client_auth_ = |
+ SslHmacChannelAuthenticator::CreateForClient(kTestSharedSecretBad); |
host_auth_ = SslHmacChannelAuthenticator::CreateForHost( |
host_cert_, key_pair_, kTestSharedSecret); |
@@ -182,24 +182,5 @@ TEST_F(SslHmacChannelAuthenticatorTest, InvalidChannelSecret) { |
ASSERT_TRUE(host_socket_.get() == nullptr); |
} |
-// Verify that channels cannot be using invalid certificate. |
-TEST_F(SslHmacChannelAuthenticatorTest, InvalidCertificate) { |
- // Import a second certificate for the client to expect. |
- scoped_refptr<net::X509Certificate> host_cert2( |
- net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem")); |
- std::string host_cert2_der; |
- ASSERT_TRUE(net::X509Certificate::GetDEREncoded(host_cert2->os_cert_handle(), |
- &host_cert2_der)); |
- |
- client_auth_ = SslHmacChannelAuthenticator::CreateForClient( |
- host_cert2_der, kTestSharedSecret); |
- host_auth_ = SslHmacChannelAuthenticator::CreateForHost( |
- host_cert_, key_pair_, kTestSharedSecret); |
- |
- RunChannelAuth(net::ERR_CERT_INVALID, net::ERR_CONNECTION_CLOSED); |
- |
- ASSERT_TRUE(host_socket_.get() == nullptr); |
-} |
- |
} // namespace protocol |
} // namespace remoting |