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

Side by Side Diff: chrome/browser/ssl/chrome_security_state_model_client_unittest.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/security_state/security_state_model.h" 7 #include "components/security_state/security_state_model.h"
8 #include "content/public/browser/security_style_explanation.h" 8 #include "content/public/browser/security_style_explanation.h"
9 #include "content/public/browser/security_style_explanations.h" 9 #include "content/public/browser/security_style_explanations.h"
10 #include "net/cert/cert_status_flags.h" 10 #include "net/cert/cert_status_flags.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 &explanations); 184 &explanations);
185 content::SecurityStyleExplanation explanation; 185 content::SecurityStyleExplanation explanation;
186 ASSERT_TRUE(FindSecurityStyleExplanation( 186 ASSERT_TRUE(FindSecurityStyleExplanation(
187 explanations.secure_explanations, "Secure Connection", &explanation)); 187 explanations.secure_explanations, "Secure Connection", &explanation));
188 EXPECT_EQ( 188 EXPECT_EQ(
189 "The connection to this site is encrypted and authenticated using a " 189 "The connection to this site is encrypted and authenticated using a "
190 "strong protocol (TLS 1.2), a strong key exchange (ECDHE_RSA), and a " 190 "strong protocol (TLS 1.2), a strong key exchange (ECDHE_RSA), and a "
191 "strong cipher (CHACHA20_POLY1305).", 191 "strong cipher (CHACHA20_POLY1305).",
192 explanation.description); 192 explanation.description);
193 } 193 }
194
195 // TLS 1.3 ciphers use the key exchange group exclusively.
196 net::SSLConnectionStatusSetCipherSuite(0x1301 /* TLS_AES_128_GCM_SHA256 */,
197 &security_info.connection_status);
198 net::SSLConnectionStatusSetVersion(net::SSL_CONNECTION_VERSION_TLS1_3,
199 &security_info.connection_status);
200 security_info.key_exchange_group = 29; // X25519
201 {
202 content::SecurityStyleExplanations explanations;
203 ChromeSecurityStateModelClient::GetSecurityStyle(security_info,
204 &explanations);
205 content::SecurityStyleExplanation explanation;
206 ASSERT_TRUE(FindSecurityStyleExplanation(
207 explanations.secure_explanations, "Secure Connection", &explanation));
208 EXPECT_EQ(
209 "The connection to this site is encrypted and authenticated using a "
210 "strong protocol (TLS 1.3), a strong key exchange (X25519), and a "
211 "strong cipher (AES_128_GCM).",
212 explanation.description);
213 }
194 } 214 }
195 215
196 } // namespace 216 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698