Refactor client cert private key handling.
https://codereview.chromium.org/2898573002
This commit is contained in:
parent
b69913975b
commit
5831a5ffa1
6 changed files with 22 additions and 11 deletions
|
@ -699,10 +699,17 @@ void App::AllowCertificateError(
|
|||
void App::SelectClientCertificate(
|
||||
content::WebContents* web_contents,
|
||||
net::SSLCertRequestInfo* cert_request_info,
|
||||
net::CertificateList client_certs,
|
||||
net::ClientCertIdentityList identities,
|
||||
std::unique_ptr<content::ClientCertificateDelegate> delegate) {
|
||||
std::shared_ptr<content::ClientCertificateDelegate>
|
||||
shared_delegate(delegate.release());
|
||||
|
||||
// Convert the ClientCertIdentityList to a CertificateList
|
||||
// to avoid changes in the API.
|
||||
auto client_certs = net::CertificateList();
|
||||
for (const std::unique_ptr<net::ClientCertIdentity>& identity : identities)
|
||||
client_certs.push_back(identity->certificate());
|
||||
|
||||
bool prevent_default =
|
||||
Emit("select-client-certificate",
|
||||
WebContents::CreateFrom(isolate(), web_contents),
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "native_mate/dictionary.h"
|
||||
#include "native_mate/handle.h"
|
||||
#include "net/base/completion_callback.h"
|
||||
#include "net/ssl/client_cert_identity.h"
|
||||
|
||||
#if defined(USE_NSS_CERTS)
|
||||
#include "chrome/browser/certificate_manager_model.h"
|
||||
|
@ -149,7 +150,7 @@ class App : public AtomBrowserClient::Delegate,
|
|||
void SelectClientCertificate(
|
||||
content::WebContents* web_contents,
|
||||
net::SSLCertRequestInfo* cert_request_info,
|
||||
net::CertificateList client_certs,
|
||||
net::ClientCertIdentityList client_certs,
|
||||
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
|
||||
|
||||
// content::GpuDataManagerObserver:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue