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

Side by Side Diff: chrome/browser/ssl/chrome_security_state_model_client_browser_tests.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 unified diff | Download patch
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 "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 content::WebContents* web_contents = 169 content::WebContents* web_contents =
170 browser->tab_strip_model()->GetActiveWebContents(); 170 browser->tab_strip_model()->GetActiveWebContents();
171 SecurityStateModel::SecurityInfo security_info; 171 SecurityStateModel::SecurityInfo security_info;
172 ChromeSecurityStateModelClient::FromWebContents(web_contents) 172 ChromeSecurityStateModelClient::FromWebContents(web_contents)
173 ->GetSecurityInfo(&security_info); 173 ->GetSecurityInfo(&security_info);
174 174
175 const char *protocol, *key_exchange, *cipher, *mac; 175 const char *protocol, *key_exchange, *cipher, *mac;
176 int ssl_version = 176 int ssl_version =
177 net::SSLConnectionStatusToVersion(security_info.connection_status); 177 net::SSLConnectionStatusToVersion(security_info.connection_status);
178 net::SSLVersionToString(&protocol, ssl_version); 178 net::SSLVersionToString(&protocol, ssl_version);
179 bool is_aead; 179 bool is_aead, is_tls13;
180 uint16_t cipher_suite = 180 uint16_t cipher_suite =
181 net::SSLConnectionStatusToCipherSuite(security_info.connection_status); 181 net::SSLConnectionStatusToCipherSuite(security_info.connection_status);
182 net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 182 net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead,
183 cipher_suite); 183 &is_tls13, cipher_suite);
184 EXPECT_TRUE(is_aead); 184 EXPECT_TRUE(is_aead);
185 EXPECT_EQ(NULL, mac); // The default secure cipher does not have a MAC. 185 EXPECT_EQ(nullptr, mac); // The default secure cipher does not have a MAC.
186 EXPECT_FALSE(is_tls13); // The default secure cipher is not TLS 1.3.
186 187
187 base::string16 key_exchange_name = base::ASCIIToUTF16(key_exchange); 188 base::string16 key_exchange_name = base::ASCIIToUTF16(key_exchange);
188 if (security_info.key_exchange_group != 0) { 189 if (security_info.key_exchange_group != 0) {
189 key_exchange_name = l10n_util::GetStringFUTF16( 190 key_exchange_name = l10n_util::GetStringFUTF16(
190 IDS_SSL_KEY_EXCHANGE_WITH_GROUP, key_exchange_name, 191 IDS_SSL_KEY_EXCHANGE_WITH_GROUP, key_exchange_name,
191 base::ASCIIToUTF16( 192 base::ASCIIToUTF16(
192 SSL_get_curve_name(security_info.key_exchange_group))); 193 SSL_get_curve_name(security_info.key_exchange_group)));
193 } 194 }
194 195
195 std::vector<base::string16> description_replacements; 196 std::vector<base::string16> description_replacements;
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 ChromeSecurityStateModelClient* model_client = 1455 ChromeSecurityStateModelClient* model_client =
1455 ChromeSecurityStateModelClient::FromWebContents(web_contents); 1456 ChromeSecurityStateModelClient::FromWebContents(web_contents);
1456 ASSERT_TRUE(model_client); 1457 ASSERT_TRUE(model_client);
1457 SecurityStateModel::SecurityInfo security_info; 1458 SecurityStateModel::SecurityInfo security_info;
1458 model_client->GetSecurityInfo(&security_info); 1459 model_client->GetSecurityInfo(&security_info);
1459 EXPECT_EQ(SecurityStateModel::SECURE, security_info.security_level); 1460 EXPECT_EQ(SecurityStateModel::SECURE, security_info.security_level);
1460 EXPECT_EQ(kTestSCTStatuses, security_info.sct_verify_statuses); 1461 EXPECT_EQ(kTestSCTStatuses, security_info.sct_verify_statuses);
1461 } 1462 }
1462 1463
1463 } // namespace 1464 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698