Expose whole certificate chain to verify proc and certificate-error event.
This commit is contained in:
parent
0ef6d4631d
commit
446399c3c1
2 changed files with 5 additions and 0 deletions
|
@ -45,7 +45,11 @@ v8::Local<v8::Value> Converter<scoped_refptr<net::X509Certificate>>::ToV8(
|
||||||
std::string encoded_data;
|
std::string encoded_data;
|
||||||
net::X509Certificate::GetPEMEncoded(
|
net::X509Certificate::GetPEMEncoded(
|
||||||
val->os_cert_handle(), &encoded_data);
|
val->os_cert_handle(), &encoded_data);
|
||||||
|
std::vector<std::string> encoded_chain;
|
||||||
|
val->GetPEMEncodedChain(&encoded_chain);
|
||||||
|
|
||||||
dict.Set("data", encoded_data);
|
dict.Set("data", encoded_data);
|
||||||
|
dict.Set("chain", encoded_chain);
|
||||||
dict.Set("issuerName", val->issuer().GetDisplayName());
|
dict.Set("issuerName", val->issuer().GetDisplayName());
|
||||||
dict.Set("subjectName", val->subject().GetDisplayName());
|
dict.Set("subjectName", val->subject().GetDisplayName());
|
||||||
dict.Set("serialNumber", base::HexEncode(val->serial_number().data(),
|
dict.Set("serialNumber", base::HexEncode(val->serial_number().data(),
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Certificate Object
|
# Certificate Object
|
||||||
|
|
||||||
* `data` String - PEM encoded data
|
* `data` String - PEM encoded data
|
||||||
|
* `chain` String[] - PEM encoded chain
|
||||||
* `issuerName` String - Issuer's Common Name
|
* `issuerName` String - Issuer's Common Name
|
||||||
* `subjectName` String - Subject's Common Name
|
* `subjectName` String - Subject's Common Name
|
||||||
* `serialNumber` String - Hex value represented string
|
* `serialNumber` String - Hex value represented string
|
||||||
|
|
Loading…
Reference in a new issue