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

Side by Side Diff: net/ssl/ssl_cipher_suite_names.cc

Issue 1109283003: Change connection info strings (e.g. SHA-1 cert warnings) to be more clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unit test. Created 5 years, 7 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | net/ssl/ssl_cipher_suite_names_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "net/ssl/ssl_cipher_suite_names.h" 5 #include "net/ssl/ssl_cipher_suite_names.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 {"CAMELLIA_256_CBC"}, // 11 241 {"CAMELLIA_256_CBC"}, // 11
242 {"SEED_CBC"}, // 12 242 {"SEED_CBC"}, // 12
243 {"AES_128_GCM"}, // 13 243 {"AES_128_GCM"}, // 13
244 {"AES_256_GCM"}, // 14 244 {"AES_256_GCM"}, // 14
245 {"CAMELLIA_128_GCM"}, // 15 245 {"CAMELLIA_128_GCM"}, // 15
246 {"CAMELLIA_256_GCM"}, // 16 246 {"CAMELLIA_256_GCM"}, // 16
247 {"CHACHA20_POLY1305"}, // 17 247 {"CHACHA20_POLY1305"}, // 17
248 }; 248 };
249 249
250 const struct { 250 const struct {
251 char name[7]; 251 char name[12];
252 } kMacNames[5] = { 252 } kMacNames[5] = {
253 {"NULL"}, // 0 253 {"NULL"}, // 0
254 {"MD5"}, // 1 254 {"HMAC-MD5"}, // 1
255 {"SHA1"}, // 2 255 {"HMAC-SHA1"}, // 2
256 {"SHA256"}, // 3 256 {"HMAC-SHA256"}, // 3
257 {"SHA384"}, // 4 257 {"HMAC-SHA384"}, // 4
258 // 7 is reserved to indicate an AEAD cipher suite. 258 // 7 is reserved to indicate an AEAD cipher suite.
259 }; 259 };
260 260
261 const int kAEADMACValue = 7; 261 const int kAEADMACValue = 7;
262 262
263 int CipherSuiteCmp(const void* ia, const void* ib) { 263 int CipherSuiteCmp(const void* ia, const void* ib) {
264 const CipherSuite* a = static_cast<const CipherSuite*>(ia); 264 const CipherSuite* a = static_cast<const CipherSuite*>(ia);
265 const CipherSuite* b = static_cast<const CipherSuite*>(ib); 265 const CipherSuite* b = static_cast<const CipherSuite*>(ib);
266 266
267 if (a->cipher_suite < b->cipher_suite) { 267 if (a->cipher_suite < b->cipher_suite) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } 412 }
413 413
414 // Only AEADs allowed. 414 // Only AEADs allowed.
415 if (mac != kAEADMACValue) 415 if (mac != kAEADMACValue)
416 return false; 416 return false;
417 417
418 return true; 418 return true;
419 } 419 }
420 420
421 } // namespace net 421 } // namespace net
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | net/ssl/ssl_cipher_suite_names_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698