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 "chrome/browser/ui/android/ssl_client_certificate_request.h" | 5 #include "chrome/browser/ui/android/ssl_client_certificate_request.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "net/android/keystore_openssl.h" | 22 #include "net/android/keystore_openssl.h" |
23 #include "net/base/host_port_pair.h" | 23 #include "net/base/host_port_pair.h" |
24 #include "net/cert/cert_database.h" | 24 #include "net/cert/cert_database.h" |
25 #include "net/cert/x509_certificate.h" | 25 #include "net/cert/x509_certificate.h" |
26 #include "net/ssl/openssl_client_key_store.h" | 26 #include "net/ssl/openssl_client_key_store.h" |
27 #include "net/ssl/ssl_cert_request_info.h" | 27 #include "net/ssl/ssl_cert_request_info.h" |
28 #include "net/ssl/ssl_client_cert_type.h" | 28 #include "net/ssl/ssl_client_cert_type.h" |
29 #include "ui/android/view_android.h" | 29 #include "ui/android/view_android.h" |
30 #include "ui/android/window_android.h" | 30 #include "ui/android/window_android.h" |
31 | 31 |
| 32 using base::android::JavaParamRef; |
| 33 using base::android::ScopedJavaLocalRef; |
| 34 |
32 namespace chrome { | 35 namespace chrome { |
33 | 36 |
34 namespace { | 37 namespace { |
35 | 38 |
36 // Must be called on the I/O thread to record a client certificate | 39 // Must be called on the I/O thread to record a client certificate |
37 // and its private key in the OpenSSLClientKeyStore. | 40 // and its private key in the OpenSSLClientKeyStore. |
38 void RecordClientCertificateKey( | 41 void RecordClientCertificateKey( |
39 const scoped_refptr<net::X509Certificate>& client_cert, | 42 const scoped_refptr<net::X509Certificate>& client_cert, |
40 crypto::ScopedEVP_PKEY private_key) { | 43 crypto::ScopedEVP_PKEY private_key) { |
41 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); | 44 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 net::SSLCertRequestInfo* cert_request_info, | 210 net::SSLCertRequestInfo* cert_request_info, |
208 std::unique_ptr<content::ClientCertificateDelegate> delegate) { | 211 std::unique_ptr<content::ClientCertificateDelegate> delegate) { |
209 ui::WindowAndroid* window = ViewAndroidHelper::FromWebContents(contents) | 212 ui::WindowAndroid* window = ViewAndroidHelper::FromWebContents(contents) |
210 ->GetViewAndroid()->GetWindowAndroid(); | 213 ->GetViewAndroid()->GetWindowAndroid(); |
211 DCHECK(window); | 214 DCHECK(window); |
212 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 215 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
213 StartClientCertificateRequest(cert_request_info, window, std::move(delegate)); | 216 StartClientCertificateRequest(cert_request_info, window, std::move(delegate)); |
214 } | 217 } |
215 | 218 |
216 } // namespace chrome | 219 } // namespace chrome |
OLD | NEW |