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

Unified Diff: chrome/browser/ssl/chrome_security_state_model_client.cc

Issue 2395323002: Roll src/third_party/boringssl/src 0d81373f9..1991af690 (Closed)
Patch Set: roll further, fix things 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ssl/chrome_security_state_model_client.cc
diff --git a/chrome/browser/ssl/chrome_security_state_model_client.cc b/chrome/browser/ssl/chrome_security_state_model_client.cc
index 943b3a8f211ac5640ab495f6df5ac3f38b928518..f153396488ec73fbfb3bdf990ae9bb30528d879a 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client.cc
@@ -107,12 +107,12 @@ void AddConnectionExplanation(
const char* cipher;
const char* mac;
bool is_aead;
+ bool is_tls13;
uint16_t cipher_suite =
net::SSLConnectionStatusToCipherSuite(security_info.connection_status);
net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead,
- cipher_suite);
+ &is_tls13, cipher_suite);
base::string16 protocol_name = base::ASCIIToUTF16(protocol);
- base::string16 key_exchange_name = base::ASCIIToUTF16(key_exchange);
const base::string16 cipher_name =
(mac == NULL) ? base::ASCIIToUTF16(cipher)
: l10n_util::GetStringFUTF16(IDS_CIPHER_WITH_MAC,
@@ -120,15 +120,17 @@ void AddConnectionExplanation(
base::ASCIIToUTF16(mac));
// Include the key exchange group (previously known as curve) if specified.
- //
- // TODO(davidben): When TLS 1.3's new negotiation is implemented, omit the
- // "key exchange" if empty and only display the group, which is the true key
- // exchange. See https://crbug.com/639495.
- if (security_info.key_exchange_group != 0) {
+ base::string16 key_exchange_name;
+ if (is_tls13) {
+ key_exchange_name = base::ASCIIToUTF16(
+ SSL_get_curve_name(security_info.key_exchange_group));
+ } else if (security_info.key_exchange_group != 0) {
key_exchange_name = l10n_util::GetStringFUTF16(
- IDS_SSL_KEY_EXCHANGE_WITH_GROUP, key_exchange_name,
+ IDS_SSL_KEY_EXCHANGE_WITH_GROUP, base::ASCIIToUTF16(key_exchange),
base::ASCIIToUTF16(
SSL_get_curve_name(security_info.key_exchange_group)));
+ } else {
felt 2016/10/10 21:31:28 Why do we need this else catch-all now?
davidben 2016/10/10 21:38:19 It's because line 115 (on LHS) is gone. base::ASCI
felt 2016/10/10 22:04:07 Oh, right.
+ key_exchange_name = base::ASCIIToUTF16(key_exchange);
}
if (security_info.obsolete_ssl_status == net::OBSOLETE_SSL_NONE) {

Powered by Google App Engine
This is Rietveld 408576698