Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
don't convert a string to an array buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Aug 11, 2016
1 parent 58b391c commit 41e409d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions atom/common/native_mate_converters/net_converter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ v8::Local<v8::Value> Converter<scoped_refptr<net::X509Certificate>>::ToV8(
std::string encoded_data;
net::X509Certificate::GetPEMEncoded(
val->os_cert_handle(), &encoded_data);
auto buffer = node::Buffer::Copy(isolate,
encoded_data.data(),
encoded_data.size()).ToLocalChecked();
dict.Set("data", buffer);
dict.Set("data", encoded_data);
dict.Set("issuerName", val->issuer().GetDisplayName());
dict.Set("subjectName", val->subject().GetDisplayName());
dict.Set("serialNumber", base::HexEncode(val->serial_number().data(),
Expand Down

0 comments on commit 41e409d

Please sign in to comment.