| Index: net/socket/ssl_client_socket_openssl.cc
|
| diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
|
| index 5415755f2327dd9b4d488fba87ebf22e8d7ead61..cf094952634918a365e93c081022b473fad81352 100644
|
| --- a/net/socket/ssl_client_socket_openssl.cc
|
| +++ b/net/socket/ssl_client_socket_openssl.cc
|
| @@ -838,8 +838,19 @@ int SSLClientSocketOpenSSL::Init() {
|
| }
|
|
|
| if (!ssl_config_.next_protos.empty()) {
|
| - std::vector<uint8_t> wire_protos =
|
| - SerializeNextProtos(ssl_config_.next_protos);
|
| + // Get list of ciphers that are enabled.
|
| + STACK_OF(SSL_CIPHER)* enabled_ciphers = SSL_get_ciphers(ssl_);
|
| + DCHECK(enabled_ciphers);
|
| + std::vector<uint16> enabled_ciphers_vector;
|
| + for (size_t i = 0; i < sk_SSL_CIPHER_num(enabled_ciphers); ++i) {
|
| + const SSL_CIPHER* cipher = sk_SSL_CIPHER_value(enabled_ciphers, i);
|
| + const uint16 id = static_cast<uint16>(SSL_CIPHER_get_id(cipher));
|
| + enabled_ciphers_vector.push_back(id);
|
| + }
|
| +
|
| + std::vector<uint8_t> wire_protos = SerializeNextProtos(
|
| + ssl_config_.next_protos, IsCipherAdequateForHTTP2(cipher_suites) &&
|
| + IsTLSVersionAdequateForHTTP2(ssl_config_));
|
| SSL_set_alpn_protos(ssl_, wire_protos.empty() ? NULL : &wire_protos[0],
|
| wire_protos.size());
|
| }
|
|
|