Chromium Code Reviews| Index: net/ssl/ssl_cipher_suite_names.cc |
| diff --git a/net/ssl/ssl_cipher_suite_names.cc b/net/ssl/ssl_cipher_suite_names.cc |
| index 271ccdfd90f7d6ef6116e99a625556d5f9fe94fd..9a4d3e98ed0125d6829f627f38bea5ce0451261b 100644 |
| --- a/net/ssl/ssl_cipher_suite_names.cc |
| +++ b/net/ssl/ssl_cipher_suite_names.cc |
| @@ -4,6 +4,9 @@ |
| #include "net/ssl/ssl_cipher_suite_names.h" |
| +#if defined(USE_OPENSSL) |
| +#include <openssl/ssl.h> |
| +#endif |
| #include <stdlib.h> |
| #include "base/logging.h" |
| @@ -419,4 +422,21 @@ bool IsFalseStartableTLSCipherSuite(uint16 cipher_suite) { |
| return true; |
| } |
| +const char* ECCurveName(uint16 cipher_suite, int key_exchange_info) { |
| + int key_exchange, cipher, mac; |
| + if (!GetCipherProperties(cipher_suite, &key_exchange, &cipher, &mac)) |
|
Ryan Sleevi
2015/09/02 01:37:07
Why do this lookup for non-OpenSSL cases?
sigbjorn
2015/09/02 13:42:14
Done.
|
| + return NULL; |
|
Ryan Sleevi
2015/09/02 01:37:07
nullptr throughout.
sigbjorn
2015/09/02 13:42:14
Done.
|
| + switch (key_exchange) { |
| + case 14: // ECDHE_ECDSA |
| + case 16: // ECDHE_RSA |
|
Ryan Sleevi
2015/09/02 01:37:07
This seems very brittle; I guess it's contingent u
sigbjorn
2015/09/02 13:42:14
I don't know if the methods above are generated, t
|
| + break; |
| + default: |
| + return NULL; |
| + } |
| +#if defined(USE_OPENSSL) |
|
Ryan Sleevi
2015/09/02 01:37:07
newline between 435/436 for legibility.
sigbjorn
2015/09/02 13:42:14
Code changed.
|
| + return SSL_get_curve_name(key_exchange_info); |
| +#endif |
| + return NULL; |
| +} |
| + |
| } // namespace net |