Expose whole certificate chain to verify proc and certificate-error event.

This commit is contained in:
Greg Nolle 2016-11-06 13:37:07 +00:00 committed by Kevin Sawicki
parent 0ef6d4631d
commit 446399c3c1
2 changed files with 5 additions and 0 deletions

View file

@ -45,7 +45,11 @@ v8::Local<v8::Value> Converter<scoped_refptr<net::X509Certificate>>::ToV8(
std::string encoded_data;
net::X509Certificate::GetPEMEncoded(
val->os_cert_handle(), &encoded_data);
std::vector<std::string> encoded_chain;
val->GetPEMEncodedChain(&encoded_chain);
dict.Set("data", encoded_data);
dict.Set("chain", encoded_chain);
dict.Set("issuerName", val->issuer().GetDisplayName());
dict.Set("subjectName", val->subject().GetDisplayName());
dict.Set("serialNumber", base::HexEncode(val->serial_number().data(),

View file

@ -1,6 +1,7 @@
# Certificate Object
* `data` String - PEM encoded data
* `chain` String[] - PEM encoded chain
* `issuerName` String - Issuer's Common Name
* `subjectName` String - Subject's Common Name
* `serialNumber` String - Hex value represented string