mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-24 07:06:46 +00:00
spdm cert chain parsing
This commit is contained in:
parent
0266b5293e
commit
f2f5c52053
@ -39,6 +39,8 @@ public class DeviceSecurityEventDataHeader2 extends DeviceSecurityEventHeader {
|
|||||||
private int length = 0;
|
private int length = 0;
|
||||||
/**
|
/**
|
||||||
* Event sub headerType
|
* Event sub headerType
|
||||||
|
* SUBHEADERTYPE_MEAS_BLOCK = 0
|
||||||
|
* SUBHEADERTYPE_CERT_CHAIN = 1
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
private int subHeaderType = 0;
|
private int subHeaderType = 0;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package hirs.utils.tpm.eventlog.events;
|
package hirs.utils.tpm.eventlog.events;
|
||||||
|
|
||||||
import hirs.utils.HexUtils;
|
import hirs.utils.HexUtils;
|
||||||
|
import hirs.utils.tpm.eventlog.spdm.SpdmHa;
|
||||||
import hirs.utils.tpm.eventlog.spdm.SpdmMeasurementBlock;
|
import hirs.utils.tpm.eventlog.spdm.SpdmMeasurementBlock;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@ -75,4 +76,28 @@ public class DeviceSecurityEventDataSubHeaderCertChain extends DeviceSecurityEve
|
|||||||
// spdmMeasurementBlockList.add(spdmMeasurementBlock);
|
// spdmMeasurementBlockList.add(spdmMeasurementBlock);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a human-readable description of the data within this structure.
|
||||||
|
*
|
||||||
|
* @return a description of this structure.
|
||||||
|
*/
|
||||||
|
public String toString() {
|
||||||
|
String dsedSubHeaderInfo = "";
|
||||||
|
// dsedSubHeaderInfo += "\n SPDM Version: " + spdmVersion;
|
||||||
|
// String spdmHashAlgoStr = SpdmHa.tcgAlgIdToString(spdmMeasurementHashAlgo);
|
||||||
|
// dsedSubHeaderInfo += "\n SPDM Hash Algorithm = " + spdmHashAlgoStr;
|
||||||
|
//
|
||||||
|
// // SPDM Measurement Block List output
|
||||||
|
// dsedSubHeaderInfo += "\n Number of SPDM Measurement Blocks = " + spdmMeasurementBlockList.size();
|
||||||
|
// int spdmMeasBlockCnt = 1;
|
||||||
|
// for (SpdmMeasurementBlock spdmMeasBlock : spdmMeasurementBlockList) {
|
||||||
|
// dsedSubHeaderInfo += "\n SPDM Measurement Block # " + spdmMeasBlockCnt++ + " of " +
|
||||||
|
// spdmMeasurementBlockList.size();
|
||||||
|
// dsedSubHeaderInfo += spdmMeasBlock.toString();
|
||||||
|
// }
|
||||||
|
|
||||||
|
return dsedSubHeaderInfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user