Index: net/socket/ssl_client_socket_unittest.cc |
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc |
index 8d8e2fd942af1a170d3c63ebb8b34a209e235be6..2639870e81f36f4fefef5ad4626ced9bc629da13 100644 |
--- a/net/socket/ssl_client_socket_unittest.cc |
+++ b/net/socket/ssl_client_socket_unittest.cc |
@@ -704,6 +704,8 @@ class SSLClientSocketCertRequestInfoTest : public SSLClientSocketTest { |
sock->GetSSLCertRequestInfo(request_info.get()); |
sock->Disconnect(); |
EXPECT_FALSE(sock->IsConnected()); |
+ EXPECT_TRUE( |
+ test_server.host_port_pair().Equals(request_info->host_and_port)); |
return request_info; |
} |
@@ -2219,6 +2221,21 @@ TEST_F(SSLClientSocketCertRequestInfoTest, TwoAuthorities) { |
request_info->cert_authorities[1]); |
} |
+// cert_key_types is currently only populated on OpenSSL. |
+#if defined(USE_OPENSSL) |
+TEST_F(SSLClientSocketCertRequestInfoTest, CertKeyTypes) { |
+ SpawnedTestServer::SSLOptions ssl_options; |
+ ssl_options.request_client_certificate = true; |
+ ssl_options.client_cert_types.push_back(CLIENT_CERT_RSA_SIGN); |
+ ssl_options.client_cert_types.push_back(CLIENT_CERT_ECDSA_SIGN); |
+ scoped_refptr<SSLCertRequestInfo> request_info = GetCertRequest(ssl_options); |
+ ASSERT_TRUE(request_info.get()); |
+ ASSERT_EQ(2u, request_info->cert_key_types.size()); |
+ EXPECT_EQ(CLIENT_CERT_RSA_SIGN, request_info->cert_key_types[0]); |
+ EXPECT_EQ(CLIENT_CERT_ECDSA_SIGN, request_info->cert_key_types[1]); |
+} |
+#endif // defined(USE_OPENSSL) |
+ |
TEST_F(SSLClientSocketTest, ConnectSignedCertTimestampsEnabledTLSExtension) { |
SpawnedTestServer::SSLOptions ssl_options; |
ssl_options.signed_cert_timestamps_tls_ext = "test"; |