Search in sources :

Example 1 with TAHelper

use of com.intel.mountwilson.manifest.helper.TAHelper in project OpenAttestation by OpenAttestation.

the class IntelHostAgent method getHostAttestationReport.

@Override
public String getHostAttestationReport(String pcrList) throws IOException {
    if (vendorHostReport != null) {
        return vendorHostReport;
    }
    //        if( vmmName == null ) { getHostDetails(); } // XXX host details API is not part of core so you have to get it another way
    try {
        TAHelper helper = new TAHelper();
        HashMap<String, PcrManifest> pcrMap = helper.getQuoteInformationForHost(hostAddress.toString(), trustAgentClient, pcrList);
        vendorHostReport = helper.getHostAttestationReport(hostAddress.toString(), pcrMap, vmmName);
        log.debug("Host attestation report for {}", hostAddress);
        log.debug(vendorHostReport);
        return vendorHostReport;
    } catch (Exception e) {
        throw new IOException(e);
    }
}
Also used : PcrManifest(com.intel.mountwilson.manifest.data.PcrManifest) IOException(java.io.IOException) TAHelper(com.intel.mountwilson.manifest.helper.TAHelper) IOException(java.io.IOException)

Example 2 with TAHelper

use of com.intel.mountwilson.manifest.helper.TAHelper in project OpenAttestation by OpenAttestation.

the class IntelHostAgent method getManifest.

@Override
public HashMap<String, ? extends IManifest> getManifest() {
    if (manifestMap != null) {
        return manifestMap;
    } else {
        try {
            TAHelper helper = new TAHelper();
            HashMap<String, PcrManifest> pcrMap = helper.getQuoteInformationForHost(hostAddress.toString(), trustAgentClient, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23");
            manifestMap = pcrMap;
        } catch (Exception e) {
            //throw new IOException(e);
            log.error(e.getMessage());
        }
        return manifestMap;
    }
}
Also used : PcrManifest(com.intel.mountwilson.manifest.data.PcrManifest) TAHelper(com.intel.mountwilson.manifest.helper.TAHelper) IOException(java.io.IOException)

Aggregations

PcrManifest (com.intel.mountwilson.manifest.data.PcrManifest)2 TAHelper (com.intel.mountwilson.manifest.helper.TAHelper)2 IOException (java.io.IOException)2