| Index: android_webview/native/aw_contents_client_bridge.cc
|
| diff --git a/android_webview/native/aw_contents_client_bridge.cc b/android_webview/native/aw_contents_client_bridge.cc
|
| index 9e570af6761308a0efd7d293ce26c41705c4701a..1aedf71c48bef94884538a28757bdb82893b7472 100644
|
| --- a/android_webview/native/aw_contents_client_bridge.cc
|
| +++ b/android_webview/native/aw_contents_client_bridge.cc
|
| @@ -20,9 +20,10 @@
|
| #include "jni/AwContentsClientBridge_jni.h"
|
| #include "net/android/keystore_openssl.h"
|
| #include "net/cert/x509_certificate.h"
|
| -#include "net/ssl/openssl_client_key_store.h"
|
| #include "net/ssl/ssl_cert_request_info.h"
|
| #include "net/ssl/ssl_client_cert_type.h"
|
| +#include "net/ssl/ssl_platform_key.h"
|
| +#include "net/ssl/ssl_private_key.h"
|
| #include "url/gurl.h"
|
|
|
| using base::android::AttachCurrentThread;
|
| @@ -35,20 +36,6 @@ using content::BrowserThread;
|
|
|
| namespace android_webview {
|
|
|
| -namespace {
|
| -
|
| -// Must be called on the I/O thread to record a client certificate
|
| -// and its private key in the OpenSSLClientKeyStore.
|
| -void RecordClientCertificateKey(
|
| - const scoped_refptr<net::X509Certificate>& client_cert,
|
| - crypto::ScopedEVP_PKEY private_key) {
|
| - DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
| - net::OpenSSLClientKeyStore::GetInstance()->RecordClientCertPrivateKey(
|
| - client_cert.get(), private_key.get());
|
| -}
|
| -
|
| -} // namespace
|
| -
|
| AwContentsClientBridge::AwContentsClientBridge(JNIEnv* env, jobject obj)
|
| : java_ref_(env, obj) {
|
| DCHECK(obj);
|
| @@ -209,7 +196,7 @@ void AwContentsClientBridge::ProvideClientCertificateResponse(
|
| if (encoded_chain_ref == NULL || private_key_ref == NULL) {
|
| LOG(ERROR) << "No client certificate selected";
|
| pending_client_cert_request_delegates_.Remove(request_id);
|
| - delegate->ContinueWithCertificate(nullptr);
|
| + delegate->ContinueWithCertificate(nullptr, nullptr);
|
| delete delegate;
|
| return;
|
| }
|
| @@ -247,6 +234,9 @@ void AwContentsClientBridge::ProvideClientCertificateResponse(
|
| return;
|
| }
|
|
|
| + scoped_refptr<net::SSLPrivateKey> client_pkey =
|
| + net::WrapPrivateKey(private_key.Pass());
|
| +
|
| // Release the guard and |pending_client_cert_request_delegates_| references
|
| // to |delegate|.
|
| pending_client_cert_request_delegates_.Remove(request_id);
|
| @@ -255,12 +245,10 @@ void AwContentsClientBridge::ProvideClientCertificateResponse(
|
| // RecordClientCertificateKey() must be called on the I/O thread,
|
| // before the delegate is called with the selected certificate on
|
| // the UI thread.
|
| - content::BrowserThread::PostTaskAndReply(
|
| + content::BrowserThread::PostTask(
|
| content::BrowserThread::IO, FROM_HERE,
|
| - base::Bind(&RecordClientCertificateKey, client_cert,
|
| - base::Passed(&private_key)),
|
| base::Bind(&content::ClientCertificateDelegate::ContinueWithCertificate,
|
| - base::Owned(delegate), client_cert));
|
| + base::Owned(delegate), client_cert, client_pkey));
|
| }
|
|
|
| void AwContentsClientBridge::RunJavaScriptDialog(
|
|
|