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

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: rebase, roll further 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 content::WebContents* web_contents = 170 content::WebContents* web_contents =
171 browser->tab_strip_model()->GetActiveWebContents(); 171 browser->tab_strip_model()->GetActiveWebContents();
172 SecurityStateModel::SecurityInfo security_info; 172 SecurityStateModel::SecurityInfo security_info;
173 ChromeSecurityStateModelClient::FromWebContents(web_contents) 173 ChromeSecurityStateModelClient::FromWebContents(web_contents)
174 ->GetSecurityInfo(&security_info); 174 ->GetSecurityInfo(&security_info);
175 175
176 const char *protocol, *key_exchange, *cipher, *mac; 176 const char *protocol, *key_exchange, *cipher, *mac;
177 int ssl_version = 177 int ssl_version =
178 net::SSLConnectionStatusToVersion(security_info.connection_status); 178 net::SSLConnectionStatusToVersion(security_info.connection_status);
179 net::SSLVersionToString(&protocol, ssl_version); 179 net::SSLVersionToString(&protocol, ssl_version);
180 bool is_aead; 180 bool is_aead, is_tls13;
181 uint16_t cipher_suite = 181 uint16_t cipher_suite =
182 net::SSLConnectionStatusToCipherSuite(security_info.connection_status); 182 net::SSLConnectionStatusToCipherSuite(security_info.connection_status);
183 net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 183 net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead,
184 cipher_suite); 184 &is_tls13, cipher_suite);
185 EXPECT_TRUE(is_aead); 185 EXPECT_TRUE(is_aead);
186 EXPECT_EQ(NULL, mac); // The default secure cipher does not have a MAC. 186 EXPECT_EQ(nullptr, mac); // The default secure cipher does not have a MAC.
187 EXPECT_FALSE(is_tls13); // The default secure cipher is not TLS 1.3.
187 188
188 base::string16 key_exchange_name = base::ASCIIToUTF16(key_exchange); 189 base::string16 key_exchange_name = base::ASCIIToUTF16(key_exchange);
189 if (security_info.key_exchange_group != 0) { 190 if (security_info.key_exchange_group != 0) {
190 key_exchange_name = l10n_util::GetStringFUTF16( 191 key_exchange_name = l10n_util::GetStringFUTF16(
191 IDS_SSL_KEY_EXCHANGE_WITH_GROUP, key_exchange_name, 192 IDS_SSL_KEY_EXCHANGE_WITH_GROUP, key_exchange_name,
192 base::ASCIIToUTF16( 193 base::ASCIIToUTF16(
193 SSL_get_curve_name(security_info.key_exchange_group))); 194 SSL_get_curve_name(security_info.key_exchange_group)));
194 } 195 }
195 196
196 std::vector<base::string16> description_replacements; 197 std::vector<base::string16> description_replacements;
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 ChromeSecurityStateModelClient* model_client = 1673 ChromeSecurityStateModelClient* model_client =
1673 ChromeSecurityStateModelClient::FromWebContents(web_contents); 1674 ChromeSecurityStateModelClient::FromWebContents(web_contents);
1674 ASSERT_TRUE(model_client); 1675 ASSERT_TRUE(model_client);
1675 SecurityStateModel::SecurityInfo security_info; 1676 SecurityStateModel::SecurityInfo security_info;
1676 model_client->GetSecurityInfo(&security_info); 1677 model_client->GetSecurityInfo(&security_info);
1677 EXPECT_EQ(SecurityStateModel::SECURE, security_info.security_level); 1678 EXPECT_EQ(SecurityStateModel::SECURE, security_info.security_level);
1678 EXPECT_EQ(kTestSCTStatuses, security_info.sct_verify_statuses); 1679 EXPECT_EQ(kTestSCTStatuses, security_info.sct_verify_statuses);
1679 } 1680 }
1680 1681
1681 } // namespace 1682 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698