default to first certificate from cert store
This commit is contained in:
parent
2de5f9de6c
commit
52b2c0d27f
1 changed files with 12 additions and 5 deletions
|
@ -217,12 +217,19 @@ void AtomBrowserClient::SelectClientCertificate(
|
||||||
auto cert_path = command_line->GetSwitchValueNative(
|
auto cert_path = command_line->GetSwitchValueNative(
|
||||||
switches::kClientCertificate);
|
switches::kClientCertificate);
|
||||||
|
|
||||||
if (cert_path.empty())
|
// TODO(zcbenz): allow users to select certificate from
|
||||||
return;
|
// client_cert list. Right now defaults to first certificate
|
||||||
|
// in the list.
|
||||||
|
scoped_refptr<net::X509Certificate> certificate;
|
||||||
|
if (cert_path.empty()) {
|
||||||
|
if (!cert_request_info->client_certs.empty())
|
||||||
|
certificate = cert_request_info->client_certs[0];
|
||||||
|
} else {
|
||||||
|
certificate = ImportCertFromFile(base::FilePath(cert_path));
|
||||||
|
}
|
||||||
|
|
||||||
scoped_refptr<net::X509Certificate> certificate =
|
if (certificate.get())
|
||||||
ImportCertFromFile(base::FilePath(cert_path));
|
delegate->ContinueWithCertificate(certificate.get());
|
||||||
delegate->ContinueWithCertificate(certificate.get());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
brightray::BrowserMainParts* AtomBrowserClient::OverrideCreateBrowserMainParts(
|
brightray::BrowserMainParts* AtomBrowserClient::OverrideCreateBrowserMainParts(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue