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

Side by Side Diff: net/ssl/ssl_config_service.cc

Issue 2730623005: Make SSLConfigManager notify clients if the SHA-1 policy changes (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/ssl/ssl_config_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ssl/ssl_config_service.h" 5 #include "net/ssl/ssl_config_service.h"
6 6
7 #include <tuple>
8
7 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
8 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
9 #include "net/ssl/ssl_config_service_defaults.h" 11 #include "net/ssl/ssl_config_service_defaults.h"
10 12
11 namespace net { 13 namespace net {
12 14
13 SSLConfigService::SSLConfigService() 15 SSLConfigService::SSLConfigService()
14 : observer_list_(base::ObserverList<Observer>::NOTIFY_EXISTING_ONLY) { 16 : observer_list_(base::ObserverList<Observer>::NOTIFY_EXISTING_ONLY) {
15 } 17 }
16 18
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 for (auto& observer : observer_list_) 79 for (auto& observer : observer_list_)
78 observer.OnSSLConfigChanged(); 80 observer.OnSSLConfigChanged();
79 } 81 }
80 82
81 SSLConfigService::~SSLConfigService() { 83 SSLConfigService::~SSLConfigService() {
82 } 84 }
83 85
84 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config, 86 void SSLConfigService::ProcessConfigUpdate(const SSLConfig& orig_config,
85 const SSLConfig& new_config) { 87 const SSLConfig& new_config) {
86 bool config_changed = 88 bool config_changed =
87 (orig_config.rev_checking_enabled != new_config.rev_checking_enabled) || 89 std::tie(orig_config.rev_checking_enabled,
88 (orig_config.rev_checking_required_local_anchors != 90 orig_config.rev_checking_required_local_anchors,
89 new_config.rev_checking_required_local_anchors) || 91 orig_config.sha1_local_anchors_enabled, orig_config.version_min,
90 (orig_config.version_min != new_config.version_min) || 92 orig_config.version_max, orig_config.disabled_cipher_suites,
91 (orig_config.version_max != new_config.version_max) || 93 orig_config.channel_id_enabled, orig_config.false_start_enabled,
92 (orig_config.disabled_cipher_suites != 94 orig_config.require_ecdhe) !=
93 new_config.disabled_cipher_suites) || 95 std::tie(new_config.rev_checking_enabled,
94 (orig_config.channel_id_enabled != new_config.channel_id_enabled) || 96 new_config.rev_checking_required_local_anchors,
95 (orig_config.false_start_enabled != new_config.false_start_enabled) || 97 new_config.sha1_local_anchors_enabled, new_config.version_min,
96 (orig_config.require_ecdhe != new_config.require_ecdhe); 98 new_config.version_max, new_config.disabled_cipher_suites,
99 new_config.channel_id_enabled, new_config.false_start_enabled,
100 new_config.require_ecdhe);
97 101
98 if (config_changed) 102 if (config_changed)
99 NotifySSLConfigChange(); 103 NotifySSLConfigChange();
100 } 104 }
101 105
102 } // namespace net 106 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/ssl/ssl_config_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698