OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "android_webview/native/aw_contents_client_bridge.h" | 5 #include "android_webview/native/aw_contents_client_bridge.h" |
6 | 6 |
7 #include "android_webview/common/devtools_instrumentation.h" | 7 #include "android_webview/common/devtools_instrumentation.h" |
8 #include "android_webview/native/aw_contents.h" | 8 #include "android_webview/native/aw_contents.h" |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // Create the X509Certificate object from the encoded chain. | 232 // Create the X509Certificate object from the encoded chain. |
233 scoped_refptr<net::X509Certificate> client_cert( | 233 scoped_refptr<net::X509Certificate> client_cert( |
234 net::X509Certificate::CreateFromDERCertChain(encoded_chain)); | 234 net::X509Certificate::CreateFromDERCertChain(encoded_chain)); |
235 if (!client_cert.get()) { | 235 if (!client_cert.get()) { |
236 LOG(ERROR) << "Could not decode client certificate chain"; | 236 LOG(ERROR) << "Could not decode client certificate chain"; |
237 return; | 237 return; |
238 } | 238 } |
239 | 239 |
240 // Create an EVP_PKEY wrapper for the private key JNI reference. | 240 // Create an EVP_PKEY wrapper for the private key JNI reference. |
241 crypto::ScopedEVP_PKEY private_key( | 241 crypto::ScopedEVP_PKEY private_key( |
242 net::android::GetOpenSSLPrivateKeyWrapper(private_key_ref.obj())); | 242 net::android::GetOpenSSLPrivateKeyWrapper(private_key_ref)); |
243 if (!private_key.get()) { | 243 if (!private_key.get()) { |
244 LOG(ERROR) << "Could not create OpenSSL wrapper for private key"; | 244 LOG(ERROR) << "Could not create OpenSSL wrapper for private key"; |
245 return; | 245 return; |
246 } | 246 } |
247 | 247 |
248 // Release the guard and |pending_client_cert_request_delegates_| references | 248 // Release the guard and |pending_client_cert_request_delegates_| references |
249 // to |delegate|. | 249 // to |delegate|. |
250 pending_client_cert_request_delegates_.Remove(request_id); | 250 pending_client_cert_request_delegates_.Remove(request_id); |
251 ignore_result(guard.Release()); | 251 ignore_result(guard.Release()); |
252 | 252 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 pending_client_cert_request_delegates_.Remove(request_id); | 401 pending_client_cert_request_delegates_.Remove(request_id); |
402 | 402 |
403 delete delegate; | 403 delete delegate; |
404 } | 404 } |
405 | 405 |
406 bool RegisterAwContentsClientBridge(JNIEnv* env) { | 406 bool RegisterAwContentsClientBridge(JNIEnv* env) { |
407 return RegisterNativesImpl(env); | 407 return RegisterNativesImpl(env); |
408 } | 408 } |
409 | 409 |
410 } // namespace android_webview | 410 } // namespace android_webview |
OLD | NEW |