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

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: Comment 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 290e004ad7268df2843e7bd77d6c173bc4cd0b26..9aea3f240663ed43be862e7794a01df853f65524 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"
@@ -92,8 +94,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 |cert_id| to see if there was a connection.
- if (security_info.cert_id == 0 || security_info.connection_status == 0) {
+ // check the |connection_status| to see if there was a connection.
+ if (security_info.connection_status == 0) {
return;
}
@@ -116,6 +118,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(
@@ -360,6 +375,7 @@ void ChromeSecurityStateModelClient::GetVisibleSecurityState(
state->cert_id = ssl.cert_id;
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();

Powered by Google App Engine
This is Rietveld 408576698