Merge pull request #6881 from electron/data-string

Certificate data is now a string
This commit is contained in:
Cheng Zhao 2016-08-17 21:13:31 +09:00 committed by GitHub
commit 2e8d7cd6db

View file

@ -168,13 +168,12 @@ void OnClientCertificateSelected(
return;
}
v8::Local<v8::Object> data;
std::string data;
if (!cert_data.Get("data", &data))
return;
auto certs = net::X509Certificate::CreateCertificateListFromBytes(
node::Buffer::Data(data), node::Buffer::Length(data),
net::X509Certificate::FORMAT_AUTO);
data.c_str(), data.length(), net::X509Certificate::FORMAT_AUTO);
if (certs.size() > 0)
delegate->ContinueWithCertificate(certs[0].get());
}