Updated the code with some additional messaging information for the provisioner when it fails. I added a bit of code that eliminates the portal having an error when a support rim is failing, this doesn't allow it to ingest the rim into the database.

This commit is contained in:
Cyrus 2021-04-07 10:53:09 -04:00
parent ea5b85b703
commit 29257695c1
2 changed files with 7 additions and 2 deletions

View File

@ -790,7 +790,6 @@ public abstract class AbstractAttestationCertificateAuthority
* 3. Update the support rim with swid tag information
*/
if (dv.getLogfileCount() > 0) {
for (ByteString logFile : dv.getLogfileList()) {
try {
@ -805,6 +804,9 @@ public abstract class AbstractAttestationCertificateAuthority
String.format("%s.rimel",
defaultClientName),
logFile.toByteArray());
// this is a validity check
new TCGEventLog(support.getRimBytes());
// no issues, continue
support.setPlatformManufacturer(dv.getHw().getManufacturer());
support.setPlatformModel(dv.getHw().getProductName());
support.setFileName(String.format("%s_[%s].rimel", defaultClientName,
@ -821,6 +823,9 @@ public abstract class AbstractAttestationCertificateAuthority
}
} catch (IOException ioEx) {
LOG.error(ioEx);
} catch (Exception ex) {
LOG.error(String.format("Failed to load support rim: ", messageDigest.digest(
logFile.toByteArray()))));
}
}
} else {

View File

@ -160,7 +160,7 @@ int provision() {
= provisioner.sendAttestationCertificateRequest(certificateRequest);
if (akCertificateByteString == "") {
cout << "----> Provisioning failed.";
cout << "----> Provisioning the quote failed.";
cout << "Please refer to the Attestation CA for details." << endl;
return 0;
}