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 d6345f71501d2acc3e20384943045d90ebdfa846..197f66f76f5c21d0892a8998afb04085c0dbf7a9 100644 |
--- a/net/socket/ssl_client_socket_openssl.cc |
+++ b/net/socket/ssl_client_socket_openssl.cc |
@@ -512,6 +512,7 @@ void SSLClientSocketOpenSSL::GetSSLCertRequestInfo( |
SSLCertRequestInfo* cert_request_info) { |
cert_request_info->host_and_port = host_and_port_; |
cert_request_info->cert_authorities = cert_authorities_; |
+ cert_request_info->cert_key_types = cert_key_types_; |
} |
SSLClientSocket::NextProtoStatus SSLClientSocketOpenSSL::GetNextProto( |
@@ -616,6 +617,7 @@ void SSLClientSocketOpenSSL::Disconnect() { |
completed_handshake_ = false; |
cert_authorities_.clear(); |
+ cert_key_types_.clear(); |
client_auth_cert_needed_ = false; |
} |
@@ -1426,6 +1428,15 @@ int SSLClientSocketOpenSSL::ClientCertRequestCallback(SSL* ssl, |
OPENSSL_free(str); |
} |
+ char* client_cert_types; |
+ size_t num_client_cert_types; |
+ SSL_get_client_certificate_types(ssl, &client_cert_types, |
+ &num_client_cert_types); |
+ for (size_t i = 0; i < num_client_cert_types; i++) { |
+ cert_key_types_.push_back( |
+ static_cast<SSLClientCertType>(client_cert_types[i])); |
+ } |
+ |
return -1; // Suspends handshake. |
} |