| 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/http/transport_security_state.h" | 5 #include "net/http/transport_security_state.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #if defined(USE_OPENSSL) | 32 #if defined(USE_OPENSSL) |
| 33 #include "crypto/openssl_util.h" | 33 #include "crypto/openssl_util.h" |
| 34 #else | 34 #else |
| 35 #include "crypto/nss_util.h" | 35 #include "crypto/nss_util.h" |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 namespace net { | 38 namespace net { |
| 39 | 39 |
| 40 class TransportSecurityStateTest : public testing::Test { | 40 class TransportSecurityStateTest : public testing::Test { |
| 41 public: | 41 public: |
| 42 virtual void SetUp() { | 42 void SetUp() override { |
| 43 #if defined(USE_OPENSSL) | 43 #if defined(USE_OPENSSL) |
| 44 crypto::EnsureOpenSSLInit(); | 44 crypto::EnsureOpenSSLInit(); |
| 45 #else | 45 #else |
| 46 crypto::EnsureNSSInit(); | 46 crypto::EnsureNSSInit(); |
| 47 #endif | 47 #endif |
| 48 } | 48 } |
| 49 | 49 |
| 50 static void DisableStaticPins(TransportSecurityState* state) { | 50 static void DisableStaticPins(TransportSecurityState* state) { |
| 51 state->enable_static_pins_ = false; | 51 state->enable_static_pins_ = false; |
| 52 } | 52 } |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 // These hosts used to only be HSTS when SNI was available. | 751 // These hosts used to only be HSTS when SNI was available. |
| 752 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty( | 752 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty( |
| 753 "gmail.com")); | 753 "gmail.com")); |
| 754 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty( | 754 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty( |
| 755 "googlegroups.com")); | 755 "googlegroups.com")); |
| 756 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty( | 756 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty( |
| 757 "www.googlegroups.com")); | 757 "www.googlegroups.com")); |
| 758 } | 758 } |
| 759 | 759 |
| 760 } // namespace net | 760 } // namespace net |
| OLD | NEW |