Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Jun 12, 2020
1 parent e6941b4 commit ce34d8b
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,11 @@ export const enrichMonitorGroups: MonitorEnricher = async (
if (curCheck.tls == null) {
curCheck.tls = new HashMap();
}
if (doc.containsKey("tls.server.x509.not_after") && !doc["tls.server.x509.not_after"].isEmpty()) {
curCheck.tls.not_after = doc["tls.server.x509.not_after"][0];
} else if (doc.containsKey("tls.certificate_not_valid_after") && !doc["tls.certificate_not_valid_after"].isEmpty()) {
curCheck.tls.certificate_not_valid_after = doc["tls.certificate_not_valid_after"][0];
if (!doc["tls.certificate_not_valid_after"].isEmpty()) {
curCheck.tls.not_after = doc["tls.certificate_not_valid_after"][0];
}
if (doc.containsKey("tls.server.x509.not_after") && !doc["tls.server.x509.not_before"].isEmpty()) {
curCheck.tls.not_before = doc["tls.server.x509.not_before"][0];
} else if (doc.containsKey("tls.certificate_not_valid_before") && !doc["tls.certificate_not_valid_before"].isEmpty()) {
curCheck.tls.certificate_not_valid_before = doc["tls.certificate_not_valid_before"][0];
if (!doc["tls.certificate_not_valid_before"].isEmpty()) {
curCheck.tls.not_before = doc["tls.certificate_not_valid_before"][0];
}
state.checksByAgentIdIP[agentIdIP] = curCheck;
Expand Down

0 comments on commit ce34d8b

Please sign in to comment.