Index: net/socket/ssl_client_socket_nss.cc |
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc |
index 3651e8d62466696169433993af5f4cd92d62b67b..39a5c2a4edbaf7481f909ea3fd0af6dc151283d7 100644 |
--- a/net/socket/ssl_client_socket_nss.cc |
+++ b/net/socket/ssl_client_socket_nss.cc |
@@ -973,8 +973,23 @@ bool SSLClientSocketNSS::Core::Init(PRFileDesc* socket, |
SECStatus rv = SECSuccess; |
if (!ssl_config_.next_protos.empty()) { |
- std::vector<uint8_t> wire_protos = |
- SerializeNextProtos(ssl_config_.next_protos); |
+ //EnsureNSSSSLInit(); |
+ DCHECK(NSS_IsInitialized()); |
+ const std::vector<uint16> cipher_suites = GetNSSEnabledCipherSuites(); |
davidben
2014/12/10 21:29:57
I don't think this excludes AES-GCM when unimpleme
Ryan Sleevi
2014/12/10 22:53:06
Correct. NumImplemented returns what NSS is aware
Bence
2014/12/11 16:50:49
Done.
|
+ // We still have to apply the disabled_cipher_suites list to these cipher |
+ // suites, because NSS does not know about them quite yet. |
davidben
2014/12/10 21:29:57
Is this true? Core::Init is called from line 3304,
Bence
2014/12/11 16:50:49
Done.
|
+ std::vector<uint16> enabled_cipher_suites; |
+ for (std::vector<uint16>::const_iterator it = cipher_suites.begin(); |
+ it != cipher_suites.end(); ++it) { |
Ryan Hamilton
2014/12/10 21:11:41
for (uint16 cipher : cipher_suites) {
}
Bence
2014/12/11 16:50:49
Moot.
|
+ if (std::find(ssl_config_.disabled_cipher_suites.begin(), |
+ ssl_config_.disabled_cipher_suites.end(), |
+ *it) == ssl_config_.disabled_cipher_suites.end()) { |
Ryan Hamilton
2014/12/10 21:11:41
Hm, I wonder if this logic would be better done do
Bence
2014/12/11 16:50:49
For the time being, I decided to use SSL_CipherPre
Ryan Hamilton
2014/12/11 20:06:09
Sure, just add a TODO.
Bence
2014/12/12 15:49:24
Done.
|
+ enabled_cipher_suites.push_back(*it); |
+ } |
+ } |
+ std::vector<uint8_t> wire_protos = SerializeNextProtos( |
+ ssl_config_.next_protos, |
+ IsSecurityAdequateForHTTP2(ssl_config_, enabled_cipher_suites)); |
davidben
2014/12/10 21:29:57
There's actually yet another case, but I don't thi
Ryan Sleevi
2014/12/10 22:53:06
File an NSS bug?
Then again, when BoringSSL tries
Bence
2014/12/11 16:50:49
Acknowledged.
|
rv = SSL_SetNextProtoNego( |
nss_fd_, wire_protos.empty() ? NULL : &wire_protos[0], |
wire_protos.size()); |