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

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

Issue 2272603003: Route key_exchange_group over to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 3 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 742686a20889d284d1ef5c217febcb857e698d53..ad1743e452a4a5ea7ebbd2b78f0fa4de06c7b9fd 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ssl/chrome_security_state_model_client.h"
+#include <openssl/ssl.h>
+
#include <vector>
#include "base/command_line.h"
@@ -91,8 +93,8 @@ void AddConnectionExplanation(
// Avoid showing TLS details when we couldn't even establish a TLS connection
// (e.g. for net errors) or if there was no real connection (some tests). We
- // check the |certificate| to see if there was a connection.
- if (!security_info.certificate || security_info.connection_status == 0) {
+ // check the |connection_status| to see if there was a connection.
+ if (security_info.connection_status == 0) {
return;
}
@@ -115,6 +117,19 @@ void AddConnectionExplanation(
: l10n_util::GetStringFUTF16(IDS_CIPHER_WITH_MAC,
base::ASCIIToUTF16(cipher),
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) {
+ key_exchange_name = l10n_util::GetStringFUTF16(
+ IDS_SSL_KEY_EXCHANGE_WITH_GROUP, key_exchange_name,
+ base::ASCIIToUTF16(
+ SSL_get_curve_name(security_info.key_exchange_group)));
+ }
+
if (security_info.obsolete_ssl_status == net::OBSOLETE_SSL_NONE) {
security_style_explanations->secure_explanations.push_back(
content::SecurityStyleExplanation(
@@ -359,6 +374,7 @@ void ChromeSecurityStateModelClient::GetVisibleSecurityState(
state->certificate = ssl.certificate;
state->cert_status = ssl.cert_status;
state->connection_status = ssl.connection_status;
+ state->key_exchange_group = ssl.key_exchange_group;
state->security_bits = ssl.security_bits;
state->pkp_bypassed = ssl.pkp_bypassed;
state->sct_verify_statuses.clear();
« no previous file with comments | « chrome/app/generated_resources.grd ('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