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

Side by Side Diff: chrome/browser/ssl/chrome_security_state_model_client.cc

Issue 2418113002: Revert "Roll src/third_party/boringssl/src 0d81373f9..1991af690" (https://codereview.chromium.org/2… (Closed)
Patch Set: Created 4 years, 2 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 | « DEPS ('k') | chrome/browser/ssl/chrome_security_state_model_client_browser_tests.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/ssl/chrome_security_state_model_client.h" 5 #include "chrome/browser/ssl/chrome_security_state_model_client.h"
6 6
7 #include <openssl/ssl.h> 7 #include <openssl/ssl.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 int ssl_version = 77 int ssl_version =
78 net::SSLConnectionStatusToVersion(security_info.connection_status); 78 net::SSLConnectionStatusToVersion(security_info.connection_status);
79 const char* protocol; 79 const char* protocol;
80 net::SSLVersionToString(&protocol, ssl_version); 80 net::SSLVersionToString(&protocol, ssl_version);
81 const char* key_exchange; 81 const char* key_exchange;
82 const char* cipher; 82 const char* cipher;
83 const char* mac; 83 const char* mac;
84 bool is_aead; 84 bool is_aead;
85 bool is_tls13;
86 uint16_t cipher_suite = 85 uint16_t cipher_suite =
87 net::SSLConnectionStatusToCipherSuite(security_info.connection_status); 86 net::SSLConnectionStatusToCipherSuite(security_info.connection_status);
88 net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 87 net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead,
89 &is_tls13, cipher_suite); 88 cipher_suite);
90 base::string16 protocol_name = base::ASCIIToUTF16(protocol); 89 base::string16 protocol_name = base::ASCIIToUTF16(protocol);
90 base::string16 key_exchange_name = base::ASCIIToUTF16(key_exchange);
91 const base::string16 cipher_name = 91 const base::string16 cipher_name =
92 (mac == NULL) ? base::ASCIIToUTF16(cipher) 92 (mac == NULL) ? base::ASCIIToUTF16(cipher)
93 : l10n_util::GetStringFUTF16(IDS_CIPHER_WITH_MAC, 93 : l10n_util::GetStringFUTF16(IDS_CIPHER_WITH_MAC,
94 base::ASCIIToUTF16(cipher), 94 base::ASCIIToUTF16(cipher),
95 base::ASCIIToUTF16(mac)); 95 base::ASCIIToUTF16(mac));
96 96
97 // Include the key exchange group (previously known as curve) if specified. 97 // Include the key exchange group (previously known as curve) if specified.
98 base::string16 key_exchange_name; 98 //
99 if (is_tls13) { 99 // TODO(davidben): When TLS 1.3's new negotiation is implemented, omit the
100 key_exchange_name = base::ASCIIToUTF16( 100 // "key exchange" if empty and only display the group, which is the true key
101 SSL_get_curve_name(security_info.key_exchange_group)); 101 // exchange. See https://crbug.com/639495.
102 } else if (security_info.key_exchange_group != 0) { 102 if (security_info.key_exchange_group != 0) {
103 key_exchange_name = l10n_util::GetStringFUTF16( 103 key_exchange_name = l10n_util::GetStringFUTF16(
104 IDS_SSL_KEY_EXCHANGE_WITH_GROUP, base::ASCIIToUTF16(key_exchange), 104 IDS_SSL_KEY_EXCHANGE_WITH_GROUP, key_exchange_name,
105 base::ASCIIToUTF16( 105 base::ASCIIToUTF16(
106 SSL_get_curve_name(security_info.key_exchange_group))); 106 SSL_get_curve_name(security_info.key_exchange_group)));
107 } else {
108 key_exchange_name = base::ASCIIToUTF16(key_exchange);
109 } 107 }
110 108
111 if (security_info.obsolete_ssl_status == net::OBSOLETE_SSL_NONE) { 109 if (security_info.obsolete_ssl_status == net::OBSOLETE_SSL_NONE) {
112 security_style_explanations->secure_explanations.push_back( 110 security_style_explanations->secure_explanations.push_back(
113 content::SecurityStyleExplanation( 111 content::SecurityStyleExplanation(
114 l10n_util::GetStringUTF8(IDS_STRONG_SSL_SUMMARY), 112 l10n_util::GetStringUTF8(IDS_STRONG_SSL_SUMMARY),
115 l10n_util::GetStringFUTF8(IDS_STRONG_SSL_DESCRIPTION, protocol_name, 113 l10n_util::GetStringFUTF8(IDS_STRONG_SSL_DESCRIPTION, protocol_name,
116 key_exchange_name, cipher_name))); 114 key_exchange_name, cipher_name)));
117 return; 115 return;
118 } 116 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS); 355 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS);
358 state->displayed_password_field_on_http = 356 state->displayed_password_field_on_http =
359 !!(ssl.content_status & 357 !!(ssl.content_status &
360 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); 358 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP);
361 state->displayed_credit_card_field_on_http = 359 state->displayed_credit_card_field_on_http =
362 !!(ssl.content_status & 360 !!(ssl.content_status &
363 content::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP); 361 content::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP);
364 362
365 CheckSafeBrowsingStatus(entry, web_contents_, state); 363 CheckSafeBrowsingStatus(entry, web_contents_, state);
366 } 364 }
OLDNEW
« no previous file with comments | « DEPS ('k') | chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698