use of com.intel.mtwilson.as.controller.TblMleJpaController in project OpenAttestation by OpenAttestation.
the class HostBO method getMleDetails.
/**
*
* @param mleName
* @param mleVersion
* @param osName
* @param osVersion
* @param oemName
* @return
*/
private TblMle getMleDetails(String mleName, String mleVersion, String osName, String osVersion, String oemName) {
TblMle tblMle;
validateNull("mleName", mleName);
validateNull("mleVersion", mleVersion);
validateMleExtraAttributes(osName, osVersion, oemName);
TblMleJpaController tblMleJpa = getMleJpaController();
if (StringUtils.isNotBlank(oemName)) {
log.info("Getting BIOS MLE from database");
tblMle = tblMleJpa.findBiosMle(mleName, mleVersion, oemName);
} else {
log.info("Get VMM MLE from database");
tblMle = tblMleJpa.findVmmMle(mleName, mleVersion, osName, osVersion);
}
return tblMle;
}
use of com.intel.mtwilson.as.controller.TblMleJpaController in project OpenAttestation by OpenAttestation.
the class HostBO method findBiosMleForHost.
private TblMle findBiosMleForHost(TxtHost host) throws IOException {
TblMleJpaController tblMleJpaController = getMleJpaController();
TblMle biosMleId = tblMleJpaController.findBiosMle(host.getBios().getName(), host.getBios().getVersion(), host.getBios().getOem());
if (biosMleId == null) {
throw new ASException(ErrorCode.AS_BIOS_INCORRECT, host.getBios().getName(), host.getBios().getVersion());
}
return biosMleId;
}
use of com.intel.mtwilson.as.controller.TblMleJpaController in project OpenAttestation by OpenAttestation.
the class TrustAgentStrategy method getPcrList.
private String getPcrList(TblHosts tblHosts) {
// Get the Bios MLE without accessing cache
TblMle biosMle = new TblMleJpaController(getEntityManagerFactory()).findMleById(tblHosts.getBiosMleId().getId());
String biosPcrList = biosMle.getRequiredManifestList();
if (biosPcrList.isEmpty()) {
throw new ASException(ErrorCode.AS_MISSING_MLE_REQD_MANIFEST_LIST, tblHosts.getBiosMleId().getName(), tblHosts.getBiosMleId().getVersion());
}
// Get the Vmm MLE without accessing cache
TblMle vmmMle = new TblMleJpaController(getEntityManagerFactory()).findMleById(tblHosts.getVmmMleId().getId());
String vmmPcrList = vmmMle.getRequiredManifestList();
if (vmmPcrList == null || vmmPcrList.isEmpty()) {
throw new ASException(ErrorCode.AS_MISSING_MLE_REQD_MANIFEST_LIST, tblHosts.getVmmMleId().getName(), tblHosts.getVmmMleId().getVersion());
}
return biosPcrList + "," + vmmPcrList;
}
Aggregations