update pciids to acapciids throughout code

This commit is contained in:
iadgovuser58 2024-07-01 12:14:39 -04:00
parent 271dd815c1
commit e9c0c8c3a1
4 changed files with 15 additions and 11 deletions

View File

@ -24,7 +24,7 @@ import java.util.List;
* Provide Java access to PCI IDs.
*/
@Log4j2
public final class PciIds {
public final class AcaPciIds {
/**
* This pci ids file can be in different places on different distributions.
*/

View File

@ -13,7 +13,7 @@ import hirs.attestationca.persist.entity.userdefined.info.ComponentInfo;
import hirs.attestationca.persist.entity.userdefined.info.HardwareInfo;
import hirs.attestationca.persist.entity.userdefined.report.DeviceInfoReport;
import hirs.attestationca.persist.enums.AppraisalStatus;
import hirs.attestationca.persist.util.PciIds;
import hirs.attestationca.persist.util.AcaPciIds;
import hirs.utils.enums.DeviceInfoEnums;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.codec.digest.DigestUtils;
@ -445,8 +445,8 @@ public class CertificateAttributeScvValidator extends SupplyChainCredentialValid
// is to be displayed as the failure
fullDeltaChainComponents.clear();
for (ComponentIdentifier ci : subCompIdList) {
if (ci.isVersion2() && PciIds.DB.isReady()) {
ci = PciIds.translate((ComponentIdentifierV2) ci);
if (ci.isVersion2() && AcaPciIds.DB.isReady()) {
ci = AcaPciIds.translate((ComponentIdentifierV2) ci);
}
log.error("Unmatched component: " + ci);
fullDeltaChainComponents.add(ci);
@ -606,9 +606,9 @@ public class CertificateAttributeScvValidator extends SupplyChainCredentialValid
int unmatchedComponentCounter = 1;
for (ComponentIdentifier unmatchedComponent : pcUnmatchedComponents) {
if (unmatchedComponent.isVersion2() && PciIds.DB.isReady()) {
if (unmatchedComponent.isVersion2() && AcaPciIds.DB.isReady()) {
unmatchedComponent =
PciIds.translate((ComponentIdentifierV2) unmatchedComponent);
AcaPciIds.translate((ComponentIdentifierV2) unmatchedComponent);
}
log.error("Unmatched component " + unmatchedComponentCounter++ + ": "
+ unmatchedComponent);

View File

@ -12,7 +12,7 @@ import hirs.attestationca.persist.entity.userdefined.certificate.IssuedAttestati
import hirs.attestationca.persist.entity.userdefined.certificate.PlatformCredential;
import hirs.attestationca.persist.entity.userdefined.certificate.attributes.ComponentIdentifier;
import hirs.attestationca.persist.entity.userdefined.certificate.attributes.PlatformConfiguration;
import hirs.attestationca.persist.util.PciIds;
import hirs.attestationca.persist.util.AcaPciIds;
import hirs.utils.BouncyCastleUtils;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
@ -371,8 +371,8 @@ public final class CertificateStringMapBuilder {
.findByCertificateSerialNumberAndBoardSerialNumber(
certificate.getSerialNumber().toString(),
certificate.getPlatformSerial());
if (PciIds.DB.isReady()) {
compResults = PciIds.translateResults(compResults);
if (AcaPciIds.DB.isReady()) {
compResults = AcaPciIds.translateResults(compResults);
}
data.put("componentResults", compResults);
@ -381,8 +381,8 @@ public final class CertificateStringMapBuilder {
if (platformConfiguration != null) {
//Component Identifier - attempt to translate hardware IDs
List<ComponentIdentifier> comps = platformConfiguration.getComponentIdentifier();
if (PciIds.DB.isReady()) {
comps = PciIds.translate(comps);
if (AcaPciIds.DB.isReady()) {
comps = AcaPciIds.translate(comps);
}
data.put("componentsIdentifier", comps);
//Component Identifier URI

View File

@ -0,0 +1,4 @@
package hirs.utils;
public class PciIds {
}