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

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 1957483003: Removal of SignedCertificateTimestampStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed constructor of SSLStatus() Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/child/web_url_loader_impl.h" 5 #include "content/child/web_url_loader_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 20 matching lines...) Expand all
31 #include "content/child/sync_load_response.h" 31 #include "content/child/sync_load_response.h"
32 #include "content/child/web_url_request_util.h" 32 #include "content/child/web_url_request_util.h"
33 #include "content/child/weburlresponse_extradata_impl.h" 33 #include "content/child/weburlresponse_extradata_impl.h"
34 #include "content/common/resource_messages.h" 34 #include "content/common/resource_messages.h"
35 #include "content/common/resource_request_body.h" 35 #include "content/common/resource_request_body.h"
36 #include "content/common/service_worker/service_worker_types.h" 36 #include "content/common/service_worker/service_worker_types.h"
37 #include "content/common/ssl_status_serialization.h" 37 #include "content/common/ssl_status_serialization.h"
38 #include "content/public/child/fixed_received_data.h" 38 #include "content/public/child/fixed_received_data.h"
39 #include "content/public/child/request_peer.h" 39 #include "content/public/child/request_peer.h"
40 #include "content/public/common/browser_side_navigation_policy.h" 40 #include "content/public/common/browser_side_navigation_policy.h"
41 #include "content/public/common/signed_certificate_timestamp_id_and_status.h"
42 #include "content/public/common/ssl_status.h" 41 #include "content/public/common/ssl_status.h"
43 #include "net/base/data_url.h" 42 #include "net/base/data_url.h"
44 #include "net/base/filename_util.h" 43 #include "net/base/filename_util.h"
45 #include "net/base/net_errors.h" 44 #include "net/base/net_errors.h"
46 #include "net/cert/cert_status_flags.h" 45 #include "net/cert/cert_status_flags.h"
47 #include "net/cert/sct_status_flags.h" 46 #include "net/cert/sct_status_flags.h"
48 #include "net/http/http_response_headers.h" 47 #include "net/http/http_response_headers.h"
49 #include "net/http/http_util.h" 48 #include "net/http/http_util.h"
50 #include "net/ssl/ssl_cipher_suite_names.h" 49 #include "net/ssl/ssl_cipher_suite_names.h"
51 #include "net/ssl/ssl_connection_status_flags.h" 50 #include "net/ssl/ssl_connection_status_flags.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 case SECURITY_STYLE_WARNING: 248 case SECURITY_STYLE_WARNING:
250 securityStyle = WebURLResponse::SecurityStyleWarning; 249 securityStyle = WebURLResponse::SecurityStyleWarning;
251 break; 250 break;
252 case SECURITY_STYLE_AUTHENTICATED: 251 case SECURITY_STYLE_AUTHENTICATED:
253 securityStyle = WebURLResponse::SecurityStyleAuthenticated; 252 securityStyle = WebURLResponse::SecurityStyleAuthenticated;
254 break; 253 break;
255 } 254 }
256 255
257 response->setSecurityStyle(securityStyle); 256 response->setSecurityStyle(securityStyle);
258 257
259 SignedCertificateTimestampIDStatusList sct_list = 258 int num_unknown_scts = ssl_status.num_unknown_scts;
estark 2016/05/07 07:12:51 size_t (and the following lines also)
dwaxweiler 2016/05/07 13:09:40 Acknowledged.
260 ssl_status.signed_certificate_timestamp_ids; 259 int num_invalid_scts = ssl_status.num_invalid_scts;
261 260 int num_valid_scts = ssl_status.num_valid_scts;
262 size_t num_unknown_scts = 0;
263 size_t num_invalid_scts = 0;
264 size_t num_valid_scts = 0;
265
266 SignedCertificateTimestampIDStatusList::iterator iter;
267 for (iter = sct_list.begin(); iter < sct_list.end(); ++iter) {
268 switch (iter->status) {
269 case net::ct::SCT_STATUS_LOG_UNKNOWN:
270 num_unknown_scts++;
271 break;
272 case net::ct::SCT_STATUS_INVALID:
273 num_invalid_scts++;
274 break;
275 case net::ct::SCT_STATUS_OK:
276 num_valid_scts++;
277 break;
278 case net::ct::SCT_STATUS_NONE:
279 case net::ct::SCT_STATUS_MAX:
280 // These enum values do not represent SCTs that are taken into account
281 // for CT compliance calculations, so we ignore them.
282 break;
283 }
284 }
285 261
286 blink::WebURLResponse::WebSecurityDetails webSecurityDetails( 262 blink::WebURLResponse::WebSecurityDetails webSecurityDetails(
287 WebString::fromUTF8(protocol), WebString::fromUTF8(key_exchange), 263 WebString::fromUTF8(protocol), WebString::fromUTF8(key_exchange),
288 WebString::fromUTF8(cipher), WebString::fromUTF8(mac), 264 WebString::fromUTF8(cipher), WebString::fromUTF8(mac),
289 ssl_status.cert_id, num_unknown_scts, num_invalid_scts, num_valid_scts); 265 ssl_status.cert_id, num_unknown_scts, num_invalid_scts, num_valid_scts);
290 266
291 response->setSecurityDetails(webSecurityDetails); 267 response->setSecurityDetails(webSecurityDetails);
292 } 268 }
293 269
294 } // namespace 270 } // namespace
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 response->clearHTTPHeaderField(webStringName); 1188 response->clearHTTPHeaderField(webStringName);
1213 while (response_headers->EnumerateHeader(&iterator, name, &value)) { 1189 while (response_headers->EnumerateHeader(&iterator, name, &value)) {
1214 response->addHTTPHeaderField(webStringName, 1190 response->addHTTPHeaderField(webStringName,
1215 WebString::fromLatin1(value)); 1191 WebString::fromLatin1(value));
1216 } 1192 }
1217 } 1193 }
1218 return true; 1194 return true;
1219 } 1195 }
1220 1196
1221 } // namespace content 1197 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698