| 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 <utility> | 10 #include <utility> |
| (...skipping 3328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3339 base::Time::Now() + base::TimeDelta::FromSeconds(10000), true, | 3339 base::Time::Now() + base::TimeDelta::FromSeconds(10000), true, |
| 3340 expected_hashes, GURL()); | 3340 expected_hashes, GURL()); |
| 3341 | 3341 |
| 3342 SSLConfig ssl_config; | 3342 SSLConfig ssl_config; |
| 3343 int rv; | 3343 int rv; |
| 3344 ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv)); | 3344 ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv)); |
| 3345 SSLInfo ssl_info; | 3345 SSLInfo ssl_info; |
| 3346 ASSERT_TRUE(sock_->GetSSLInfo(&ssl_info)); | 3346 ASSERT_TRUE(sock_->GetSSLInfo(&ssl_info)); |
| 3347 | 3347 |
| 3348 EXPECT_EQ(ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN, rv); | 3348 EXPECT_EQ(ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN, rv); |
| 3349 EXPECT_TRUE(ssl_info.cert_status & CERT_STATUS_PINNED_KEY_MISSING); |
| 3349 EXPECT_TRUE(sock_->IsConnected()); | 3350 EXPECT_TRUE(sock_->IsConnected()); |
| 3350 | 3351 |
| 3351 EXPECT_FALSE(ssl_info.pkp_bypassed); | 3352 EXPECT_FALSE(ssl_info.pkp_bypassed); |
| 3352 } | 3353 } |
| 3353 | 3354 |
| 3354 } // namespace net | 3355 } // namespace net |
| OLD | NEW |