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 "base/base64.h" | 5 #include "base/base64.h" |
6 #include "base/format_macros.h" | 6 #include "base/format_macros.h" |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 return false; | 171 return false; |
172 std::string serial(data->data(), serial_length); | 172 std::string serial(data->data(), serial_length); |
173 data->remove_prefix(serial_length); | 173 data->remove_prefix(serial_length); |
174 out_serials->push_back(serial); | 174 out_serials->push_back(serial); |
175 } | 175 } |
176 | 176 |
177 return true; | 177 return true; |
178 } | 178 } |
179 | 179 |
180 bool CRLSet::CopyBlockedSPKIsFromHeader(base::DictionaryValue* header_dict) { | 180 bool CRLSet::CopyBlockedSPKIsFromHeader(base::DictionaryValue* header_dict) { |
181 ListValue* blocked_spkis_list = NULL; | 181 base::ListValue* blocked_spkis_list = NULL; |
182 if (!header_dict->GetList("BlockedSPKIs", &blocked_spkis_list)) { | 182 if (!header_dict->GetList("BlockedSPKIs", &blocked_spkis_list)) { |
183 // BlockedSPKIs is optional, so it's fine if we don't find it. | 183 // BlockedSPKIs is optional, so it's fine if we don't find it. |
184 return true; | 184 return true; |
185 } | 185 } |
186 | 186 |
187 blocked_spkis_.clear(); | 187 blocked_spkis_.clear(); |
188 | 188 |
189 for (size_t i = 0; i < blocked_spkis_list->GetSize(); ++i) { | 189 for (size_t i = 0; i < blocked_spkis_list->GetSize(); ++i) { |
190 std::string spki_sha256_base64, spki_sha256; | 190 std::string spki_sha256_base64, spki_sha256; |
191 if (!blocked_spkis_list->GetString(i, &spki_sha256_base64)) | 191 if (!blocked_spkis_list->GetString(i, &spki_sha256_base64)) |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 return new CRLSet; | 584 return new CRLSet; |
585 } | 585 } |
586 | 586 |
587 CRLSet* CRLSet::ExpiredCRLSetForTesting() { | 587 CRLSet* CRLSet::ExpiredCRLSetForTesting() { |
588 CRLSet* crl_set = new CRLSet; | 588 CRLSet* crl_set = new CRLSet; |
589 crl_set->not_after_ = 1; | 589 crl_set->not_after_ = 1; |
590 return crl_set; | 590 return crl_set; |
591 } | 591 } |
592 | 592 |
593 } // namespace net | 593 } // namespace net |
OLD | NEW |