mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-21 13:57:56 +00:00
initial commit
This commit is contained in:
parent
26fc356db0
commit
bdb32d13ad
@ -31,7 +31,7 @@ public final class CertificateStringMapBuilder {
|
||||
|
||||
private static final Logger LOGGER =
|
||||
LogManager.getLogger(CertificateStringMapBuilder.class);
|
||||
private static final int SERIAL_INDEX = 1;
|
||||
private static final int VALUE_INDEX = 1;
|
||||
|
||||
private CertificateStringMapBuilder() {
|
||||
|
||||
@ -343,13 +343,13 @@ public final class CertificateStringMapBuilder {
|
||||
//component failure
|
||||
StringBuilder savedFailures = new StringBuilder();
|
||||
String[] serialSplit;
|
||||
for (String s : certificate.getComponentFailures().split(",")) {
|
||||
if (s.contains("Serial")) {
|
||||
serialSplit = s.split("=");
|
||||
if (serialSplit.length > SERIAL_INDEX) {
|
||||
savedFailures.append(serialSplit[SERIAL_INDEX]);
|
||||
for (String str : certificate.getComponentFailures().split(",")) {
|
||||
if (str.contains("Model")) {
|
||||
serialSplit = str.split("=");
|
||||
if (serialSplit.length > VALUE_INDEX) {
|
||||
savedFailures.append(serialSplit[VALUE_INDEX]);
|
||||
} else {
|
||||
savedFailures.append(s);
|
||||
savedFailures.append(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -852,9 +852,9 @@ public final class SupplyChainCredentialValidator implements CredentialValidator
|
||||
LOGGER.error(String.format("Platform Credential contained %d unmatched components:",
|
||||
pcUnmatchedComponents.size()));
|
||||
|
||||
int umatchedComponentCounter = 1;
|
||||
int unmatchedComponentCounter = 1;
|
||||
for (ComponentIdentifier unmatchedComponent : pcUnmatchedComponents) {
|
||||
LOGGER.error("Unmatched component " + umatchedComponentCounter++ + ": "
|
||||
LOGGER.error("Unmatched component " + unmatchedComponentCounter++ + ": "
|
||||
+ unmatchedComponent);
|
||||
sb.append(String.format("Manufacturer=%s, Model=%s, Serial=%s, Revision=%s%n",
|
||||
unmatchedComponent.getComponentManufacturer(),
|
||||
|
Loading…
Reference in New Issue
Block a user