get cert subject
This commit is contained in:
parent
19d6ac68de
commit
86f28ebbda
|
@ -38,6 +38,7 @@ certInfo.getCertInfo = function (pem) {
|
||||||
certInfo.getBasicInfo = function (pem) {
|
certInfo.getBasicInfo = function (pem) {
|
||||||
var c = certInfo.getCertInfo(pem);
|
var c = certInfo.getCertInfo(pem);
|
||||||
var domains = [];
|
var domains = [];
|
||||||
|
var sub;
|
||||||
|
|
||||||
c.extensions.forEach(function (ext) {
|
c.extensions.forEach(function (ext) {
|
||||||
if (ext.parsedValue && ext.parsedValue.altNames) {
|
if (ext.parsedValue && ext.parsedValue.altNames) {
|
||||||
|
@ -47,10 +48,13 @@ certInfo.getBasicInfo = function (pem) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
sub = c.subject.types_and_values[0].value.value_block.value || null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
issuedAt: c.notBefore.value
|
issuedAt: c.notBefore.value
|
||||||
, expiresAt: c.notAfter.value
|
, expiresAt: c.notAfter.value
|
||||||
, domains: domains
|
, domains: domains
|
||||||
|
, subject: sub
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue