diff --git a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/PcrValidator.java b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/PcrValidator.java index a8b4c7fa..6620f815 100644 --- a/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/PcrValidator.java +++ b/HIRS_AttestationCA/src/main/java/hirs/attestationca/persist/validation/PcrValidator.java @@ -66,6 +66,13 @@ public class PcrValidator { baselinePcrs = Arrays.copyOf(pcrValues, TPMMeasurementRecord.MAX_PCR_ID + 1); } + /** + * Builds a string array of stored pcrs. + * + * @param pcrContent string representation of the pcr content + * @param algorithmLength length of the algorithm + * @return string array representation of the stored pcrs. + */ public static String[] buildStoredPcrs(final String pcrContent, final int algorithmLength) { // we have a full set of PCR values String[] pcrSet = pcrContent.split("\\n"); @@ -244,9 +251,9 @@ public class PcrValidator { // other information. String calculatedString = Hex.encodeHexString( pcrInfoShort.getCalculatedDigest()); - log.debug("Validating PCR information with the following:" + - System.lineSeparator() + "calculatedString = " + calculatedString + - System.lineSeparator() + "quoteString = " + quoteString); + log.debug("Validating PCR information with the following:" + + System.lineSeparator() + "calculatedString = " + calculatedString + + System.lineSeparator() + "quoteString = " + quoteString); validated = quoteString.contains(calculatedString); if (!validated) { log.warn(calculatedString + " not found in " + quoteString); diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java index ab515308..16d2e988 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestDetailsPageController.java @@ -97,11 +97,12 @@ public class ReferenceManifestDetailsPageController * @throws NoSuchAlgorithmException If an unknown Algorithm is encountered. * @throws CertificateException if a certificate doesn't parse. */ - public static HashMap getRimDetailInfo(final UUID uuid, - final ReferenceManifestRepository referenceManifestRepository, - final ReferenceDigestValueRepository referenceDigestValueRepository, - final CertificateRepository certificateRepository, - final CACredentialRepository caCertificateRepository) + public static HashMap getRimDetailInfo( + final UUID uuid, + final ReferenceManifestRepository referenceManifestRepository, + final ReferenceDigestValueRepository referenceDigestValueRepository, + final CertificateRepository certificateRepository, + final CACredentialRepository caCertificateRepository) throws IOException, CertificateException, NoSuchAlgorithmException { HashMap data = new HashMap<>(); @@ -297,7 +298,7 @@ public class ReferenceManifestDetailsPageController * @return list of X509Certificates */ private static List convertCACsToX509Certificates( - Set set) + final Set set) throws IOException { ArrayList certs = new ArrayList<>(set.size()); for (CertificateAuthorityCredential cac : set) { diff --git a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestPageController.java b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestPageController.java index 54af3181..fc84e213 100644 --- a/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestPageController.java +++ b/HIRS_AttestationCAPortal/src/main/java/hirs/attestationca/portal/page/controllers/ReferenceManifestPageController.java @@ -76,8 +76,9 @@ public class ReferenceManifestPageController extends PageController