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 89d2952875b1b5c6c0a720b3c960e457c44100ed..18441a3e1de30c48ef8f88b03f74cd879f5a86df 100644 |
--- a/net/socket/ssl_client_socket_openssl.cc |
+++ b/net/socket/ssl_client_socket_openssl.cc |
@@ -1027,9 +1027,7 @@ int SSLClientSocketOpenSSL::DoChannelIDLookup() { |
net_log_.AddEvent(NetLog::TYPE_SSL_CHANNEL_ID_REQUESTED); |
GotoState(STATE_CHANNEL_ID_LOOKUP_COMPLETE); |
return channel_id_service_->GetOrCreateChannelID( |
- host_and_port_.host(), |
- &channel_id_private_key_, |
- &channel_id_cert_, |
+ host_and_port_.host(), &channel_id_key_, |
base::Bind(&SSLClientSocketOpenSSL::OnHandshakeIOComplete, |
base::Unretained(this)), |
&channel_id_request_handle_); |
@@ -1039,22 +1037,7 @@ int SSLClientSocketOpenSSL::DoChannelIDLookupComplete(int result) { |
if (result < 0) |
return result; |
- DCHECK_LT(0u, channel_id_private_key_.size()); |
- // Decode key. |
- std::vector<uint8> encrypted_private_key_info; |
- std::vector<uint8> subject_public_key_info; |
- encrypted_private_key_info.assign( |
- channel_id_private_key_.data(), |
- channel_id_private_key_.data() + channel_id_private_key_.size()); |
- subject_public_key_info.assign( |
- channel_id_cert_.data(), |
- channel_id_cert_.data() + channel_id_cert_.size()); |
- scoped_ptr<crypto::ECPrivateKey> ec_private_key( |
- crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo( |
- ChannelIDService::kEPKIPassword, |
- encrypted_private_key_info, |
- subject_public_key_info)); |
- if (!ec_private_key) { |
+ if (!channel_id_key_) { |
LOG(ERROR) << "Failed to import Channel ID."; |
return ERR_CHANNEL_ID_IMPORT_FAILED; |
} |
@@ -1062,7 +1045,7 @@ int SSLClientSocketOpenSSL::DoChannelIDLookupComplete(int result) { |
// Hand the key to OpenSSL. Check for error in case OpenSSL rejects the key |
// type. |
crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); |
- int rv = SSL_set1_tls_channel_id(ssl_, ec_private_key->key()); |
+ int rv = SSL_set1_tls_channel_id(ssl_, channel_id_key_->key()); |
if (!rv) { |
LOG(ERROR) << "Failed to set Channel ID."; |
int err = SSL_get_error(ssl_, rv); |