mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-18 12:46:30 +00:00
Clean up checkstyle warnings
Some checks failed
Dotnet Provisioner Unit Tests / Restore and Run Unit Tests (ubuntu-20.04) (push) Has been cancelled
Dotnet Provisioner Unit Tests / Restore and Run Unit Tests (windows-2022) (push) Has been cancelled
Dotnet Provisioner Unit Tests / Evaluate Tests (push) Has been cancelled
HIRS Build and Unit Test / ACA_Provisioner_Unit_Tests (push) Has been cancelled
HIRS System Tests / DockerTests (push) Has been cancelled
Some checks failed
Dotnet Provisioner Unit Tests / Restore and Run Unit Tests (ubuntu-20.04) (push) Has been cancelled
Dotnet Provisioner Unit Tests / Restore and Run Unit Tests (windows-2022) (push) Has been cancelled
Dotnet Provisioner Unit Tests / Evaluate Tests (push) Has been cancelled
HIRS Build and Unit Test / ACA_Provisioner_Unit_Tests (push) Has been cancelled
HIRS System Tests / DockerTests (push) Has been cancelled
This commit is contained in:
parent
cb2ba1a846
commit
6af53fe497
@ -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);
|
||||
|
@ -97,7 +97,8 @@ public class ReferenceManifestDetailsPageController
|
||||
* @throws NoSuchAlgorithmException If an unknown Algorithm is encountered.
|
||||
* @throws CertificateException if a certificate doesn't parse.
|
||||
*/
|
||||
public static HashMap<String, Object> getRimDetailInfo(final UUID uuid,
|
||||
public static HashMap<String, Object> getRimDetailInfo(
|
||||
final UUID uuid,
|
||||
final ReferenceManifestRepository referenceManifestRepository,
|
||||
final ReferenceDigestValueRepository referenceDigestValueRepository,
|
||||
final CertificateRepository certificateRepository,
|
||||
@ -297,7 +298,7 @@ public class ReferenceManifestDetailsPageController
|
||||
* @return list of X509Certificates
|
||||
*/
|
||||
private static List<X509Certificate> convertCACsToX509Certificates(
|
||||
Set<CertificateAuthorityCredential> set)
|
||||
final Set<CertificateAuthorityCredential> set)
|
||||
throws IOException {
|
||||
ArrayList<X509Certificate> certs = new ArrayList<>(set.size());
|
||||
for (CertificateAuthorityCredential cac : set) {
|
||||
|
@ -76,7 +76,8 @@ public class ReferenceManifestPageController extends PageController<NoPageParams
|
||||
* @param referenceDigestValueRepository this is the reference event manager
|
||||
*/
|
||||
@Autowired
|
||||
public ReferenceManifestPageController(final ReferenceManifestRepository referenceManifestRepository,
|
||||
public ReferenceManifestPageController(
|
||||
final ReferenceManifestRepository referenceManifestRepository,
|
||||
final ReferenceDigestValueRepository referenceDigestValueRepository) {
|
||||
super(Page.REFERENCE_MANIFESTS);
|
||||
this.referenceManifestRepository = referenceManifestRepository;
|
||||
@ -177,10 +178,10 @@ public class ReferenceManifestPageController extends PageController<NoPageParams
|
||||
if (isBaseRim || isSupportRim) {
|
||||
parseRIM(file, isSupportRim, messages, baseRims, supportRims);
|
||||
} else {
|
||||
String errorString = "The file extension of " + fileName + " was not recognized." +
|
||||
" Base RIMs support the extension \".swidtag\", and support RIMs support " +
|
||||
"\".rimpcr\", \".rimel\", \".bin\", and \".log\". " +
|
||||
"Please verify your upload and retry.";
|
||||
String errorString = "The file extension of " + fileName + " was not recognized."
|
||||
+ " Base RIMs support the extension \".swidtag\", and support RIMs support "
|
||||
+ "\".rimpcr\", \".rimel\", \".bin\", and \".log\". "
|
||||
+ "Please verify your upload and retry.";
|
||||
log.error("File extension in " + fileName + " not recognized as base or support RIM.");
|
||||
messages.addError(errorString);
|
||||
}
|
||||
@ -380,7 +381,6 @@ public class ReferenceManifestPageController extends PageController<NoPageParams
|
||||
* user.
|
||||
* @param baseRims object to store multiple files
|
||||
* @param supportRims object to store multiple files
|
||||
* @return a single or collection of reference manifest files.
|
||||
*/
|
||||
private void parseRIM(
|
||||
final MultipartFile file, final boolean supportRIM,
|
||||
|
Loading…
Reference in New Issue
Block a user