| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/socket/ssl_client_socket.h" | 5 #include "net/socket/ssl_client_socket.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <openssl/bio.h> | 10 #include <openssl/bio.h> |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 | 178 |
| 179 ClientSocketFactory* socket_factory_; | 179 ClientSocketFactory* socket_factory_; |
| 180 scoped_ptr<MockCertVerifier> cert_verifier_; | 180 scoped_ptr<MockCertVerifier> cert_verifier_; |
| 181 scoped_ptr<TransportSecurityState> transport_security_state_; | 181 scoped_ptr<TransportSecurityState> transport_security_state_; |
| 182 SSLClientSocketContext context_; | 182 SSLClientSocketContext context_; |
| 183 OpenSSLClientKeyStore* key_store_; | 183 OpenSSLClientKeyStore* key_store_; |
| 184 scoped_ptr<SpawnedTestServer> test_server_; | 184 scoped_ptr<SpawnedTestServer> test_server_; |
| 185 AddressList addr_; | 185 AddressList addr_; |
| 186 TestCompletionCallback callback_; | 186 TestCompletionCallback callback_; |
| 187 CapturingNetLog log_; | 187 TestNetLog log_; |
| 188 scoped_ptr<StreamSocket> transport_; | 188 scoped_ptr<StreamSocket> transport_; |
| 189 scoped_ptr<SSLClientSocket> sock_; | 189 scoped_ptr<SSLClientSocket> sock_; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 // Connect to a server requesting client authentication, do not send | 192 // Connect to a server requesting client authentication, do not send |
| 193 // any client certificates. It should refuse the connection. | 193 // any client certificates. It should refuse the connection. |
| 194 TEST_F(SSLClientSocketOpenSSLClientAuthTest, NoCert) { | 194 TEST_F(SSLClientSocketOpenSSLClientAuthTest, NoCert) { |
| 195 SpawnedTestServer::SSLOptions ssl_options; | 195 SpawnedTestServer::SSLOptions ssl_options; |
| 196 ssl_options.request_client_certificate = true; | 196 ssl_options.request_client_certificate = true; |
| 197 | 197 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 EXPECT_TRUE(CheckSSLClientSocketSentCert()); | 259 EXPECT_TRUE(CheckSSLClientSocketSentCert()); |
| 260 | 260 |
| 261 sock_->Disconnect(); | 261 sock_->Disconnect(); |
| 262 EXPECT_FALSE(sock_->IsConnected()); | 262 EXPECT_FALSE(sock_->IsConnected()); |
| 263 } | 263 } |
| 264 #endif // defined(USE_OPENSSL_CERTS) | 264 #endif // defined(USE_OPENSSL_CERTS) |
| 265 | 265 |
| 266 } // namespace | 266 } // namespace |
| 267 } // namespace net | 267 } // namespace net |
| OLD | NEW |