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

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

Issue 2349713004: Replace key_exchange_info with key_exchange_group. (Closed)
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « net/ssl/ssl_cipher_suite_names.h ('k') | net/ssl/ssl_info.h » ('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 <openssl/ssl.h> 9 #include <openssl/ssl.h>
10 10
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 return false; 459 return false;
460 } 460 }
461 461
462 // Only AEADs allowed. 462 // Only AEADs allowed.
463 if (mac != kAEADMACValue) 463 if (mac != kAEADMACValue)
464 return false; 464 return false;
465 465
466 return true; 466 return true;
467 } 467 }
468 468
469 const char* ECCurveName(uint16_t cipher_suite, int key_exchange_info) {
470 int key_exchange, cipher, mac;
471 if (!GetCipherProperties(cipher_suite, &key_exchange, &cipher, &mac))
472 return nullptr;
473 switch (key_exchange) {
474 case 14: // ECDHE_ECDSA
475 case 16: // ECDHE_RSA
476 case 20: // ECDHE_PSK
477 break;
478 default:
479 return nullptr;
480 }
481 return SSL_get_curve_name(key_exchange_info);
482 }
483
484 } // namespace net 469 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_cipher_suite_names.h ('k') | net/ssl/ssl_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698