don't convert a string to an array buffer
This commit is contained in:
parent
58b391cb77
commit
94c60379d1
3 changed files with 5 additions and 8 deletions
|
@ -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(),
|
||||
|
|
|
@ -178,7 +178,7 @@ Returns:
|
|||
* `url` URL
|
||||
* `error` String - The error code
|
||||
* `certificate` Object
|
||||
* `data` Buffer - PEM encoded data
|
||||
* `data` String - PEM encoded data
|
||||
* `issuerName` String - Issuer's Common Name
|
||||
* `subjectName` String - Subject's Common Name
|
||||
* `serialNumber` String - Hex value represented string
|
||||
|
@ -213,7 +213,7 @@ Returns:
|
|||
* `webContents` [WebContents](web-contents.md)
|
||||
* `url` URL
|
||||
* `certificateList` [Objects]
|
||||
* `data` Buffer - PEM encoded data
|
||||
* `data` String - PEM encoded data
|
||||
* `issuerName` String - Issuer's Common Name
|
||||
* `subjectName` String - Subject's Common Name
|
||||
* `serialNumber` String - Hex value represented string
|
||||
|
|
|
@ -230,7 +230,7 @@ Returns:
|
|||
* `url` URL
|
||||
* `error` String - The error code
|
||||
* `certificate` Object
|
||||
* `data` Buffer - PEM encoded data
|
||||
* `data` String - PEM encoded data
|
||||
* `issuerName` String - Issuer's Common Name
|
||||
* `subjectName` String - Subject's Common Name
|
||||
* `serialNumber` String - Hex value represented string
|
||||
|
@ -251,7 +251,7 @@ Returns:
|
|||
* `event` Event
|
||||
* `url` URL
|
||||
* `certificateList` [Objects]
|
||||
* `data` Buffer - PEM encoded data
|
||||
* `data` String - PEM encoded data
|
||||
* `issuerName` String - Issuer's Common Name
|
||||
* `subjectName` String - Subject's Common Name
|
||||
* `serialNumber` String - Hex value represented string
|
||||
|
|
Loading…
Reference in a new issue