mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-29 15:44:14 +00:00
Updated a check on the SERIAL_INDEX in certificate string map builder. (#235)
This commit is contained in:
parent
6dd9615ee0
commit
5dbbbafafe
@ -342,9 +342,15 @@ public final class CertificateStringMapBuilder {
|
||||
data.put("CPSuri", certificate.getCPSuri());
|
||||
//component failure
|
||||
StringBuilder savedFailures = new StringBuilder();
|
||||
String[] serialSplit;
|
||||
for (String s : certificate.getComponentFailures().split(",")) {
|
||||
if (s.contains("Serial")) {
|
||||
savedFailures.append(s.split("=")[SERIAL_INDEX]);
|
||||
serialSplit = s.split("=");
|
||||
if (serialSplit.length > SERIAL_INDEX) {
|
||||
savedFailures.append(serialSplit[SERIAL_INDEX]);
|
||||
} else {
|
||||
savedFailures.append(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
data.put("failures", savedFailures.toString());
|
||||
|
Loading…
x
Reference in New Issue
Block a user