mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-02-11 13:35:19 +00:00
changed name of DeviceSecurityEventData parent and ..HEADER parent to make the naming more clear
This commit is contained in:
parent
452f9ba850
commit
9151d03a18
@ -1,11 +1,7 @@
|
|||||||
package hirs.utils.tpm.eventlog.events;
|
package hirs.utils.tpm.eventlog.events;
|
||||||
|
|
||||||
import hirs.utils.HexUtils;
|
|
||||||
import hirs.utils.tpm.eventlog.uefi.UefiConstants;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract base class to process the DEVICE_SECURITY_EVENT_DATA or ..DATA2 event.
|
* Abstract base class to process the DEVICE_SECURITY_EVENT_DATA or ..DATA2 event.
|
||||||
@ -52,7 +48,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
* even though the spec says both are in the data structure. If it is only 1, though, there's no
|
* even though the spec says both are in the data structure. If it is only 1, though, there's no
|
||||||
* method to tell them apart.
|
* method to tell them apart.
|
||||||
*/
|
*/
|
||||||
public abstract class DeviceSecurityEventDataBase {
|
public abstract class DeviceSecurityEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Human readable description of the data within the
|
* Human readable description of the data within the
|
||||||
@ -65,7 +61,7 @@ public abstract class DeviceSecurityEventDataBase {
|
|||||||
* DeviceSecurityEventData Default Constructor.
|
* DeviceSecurityEventData Default Constructor.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public DeviceSecurityEventDataBase() {
|
public DeviceSecurityEvent() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -13,7 +13,7 @@ import java.io.UnsupportedEncodingException;
|
|||||||
* } DEVICE_SECURITY_EVENT_DATA;
|
* } DEVICE_SECURITY_EVENT_DATA;
|
||||||
* <p>
|
* <p>
|
||||||
*/
|
*/
|
||||||
public class DeviceSecurityEventData extends DeviceSecurityEventDataBase {
|
public class DeviceSecurityEventData extends DeviceSecurityEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DeviceSecurityEventDataHeader Object.
|
* DeviceSecurityEventDataHeader Object.
|
||||||
|
@ -14,7 +14,7 @@ import lombok.Getter;
|
|||||||
* } DEVICE_SECURITY_EVENT_DATA2;
|
* } DEVICE_SECURITY_EVENT_DATA2;
|
||||||
* <p>
|
* <p>
|
||||||
*/
|
*/
|
||||||
public class DeviceSecurityEventData2 extends DeviceSecurityEventDataBase {
|
public class DeviceSecurityEventData2 extends DeviceSecurityEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DeviceSecurityEventDataHeader Object.
|
* DeviceSecurityEventDataHeader Object.
|
||||||
|
@ -28,7 +28,7 @@ import java.io.UnsupportedEncodingException;
|
|||||||
* <p>
|
* <p>
|
||||||
* Assumption: there is only 1 SpdmMeasurementBlock per event. Need more test patterns to verify.
|
* Assumption: there is only 1 SpdmMeasurementBlock per event. Need more test patterns to verify.
|
||||||
*/
|
*/
|
||||||
public class DeviceSecurityEventDataHeader extends DeviceSecurityEventDataHeaderBase {
|
public class DeviceSecurityEventDataHeader extends DeviceSecurityEventHeader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event data length.
|
* Event data length.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package hirs.utils.tpm.eventlog.events;
|
package hirs.utils.tpm.eventlog.events;
|
||||||
|
|
||||||
// Placeholder for Header2 data structure.
|
// Placeholder for Header2 data structure.
|
||||||
public class DeviceSecurityEventDataHeader2 extends DeviceSecurityEventDataHeaderBase {
|
public class DeviceSecurityEventDataHeader2 extends DeviceSecurityEventHeader {
|
||||||
|
|
||||||
public DeviceSecurityEventDataHeader2(final byte[] dSEDbytes) {
|
public DeviceSecurityEventDataHeader2(final byte[] dSEDbytes) {
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
* DevicePath
|
* DevicePath
|
||||||
* <p>
|
* <p>
|
||||||
*/
|
*/
|
||||||
public abstract class DeviceSecurityEventDataHeaderBase {
|
public abstract class DeviceSecurityEventHeader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains the size (in bytes) of the header.
|
* Contains the size (in bytes) of the header.
|
||||||
@ -105,7 +105,7 @@ public abstract class DeviceSecurityEventDataHeaderBase {
|
|||||||
/**
|
/**
|
||||||
* DeviceSecurityEventDataHeaderBase Default Constructor.
|
* DeviceSecurityEventDataHeaderBase Default Constructor.
|
||||||
*/
|
*/
|
||||||
public DeviceSecurityEventDataHeaderBase() {
|
public DeviceSecurityEventHeader() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ public abstract class DeviceSecurityEventDataHeaderBase {
|
|||||||
*
|
*
|
||||||
* @param dSEDbytes byte array holding the DeviceSecurityEventData.
|
* @param dSEDbytes byte array holding the DeviceSecurityEventData.
|
||||||
*/
|
*/
|
||||||
public DeviceSecurityEventDataHeaderBase(final byte[] dSEDbytes) {
|
public DeviceSecurityEventHeader(final byte[] dSEDbytes) {
|
||||||
|
|
||||||
byte[] signatureBytes = new byte[UefiConstants.SIZE_16];
|
byte[] signatureBytes = new byte[UefiConstants.SIZE_16];
|
||||||
System.arraycopy(dSEDbytes, 0, signatureBytes, 0, UefiConstants.SIZE_16);
|
System.arraycopy(dSEDbytes, 0, signatureBytes, 0, UefiConstants.SIZE_16);
|
Loading…
x
Reference in New Issue
Block a user