mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-05 04:34:16 +00:00
Some serializable updates
This commit is contained in:
parent
1b80e99de8
commit
54c712d52b
@ -11,6 +11,7 @@ import javax.persistence.Embeddable;
|
|||||||
import javax.persistence.EnumType;
|
import javax.persistence.EnumType;
|
||||||
import javax.persistence.Enumerated;
|
import javax.persistence.Enumerated;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,7 +27,7 @@ import java.util.Arrays;
|
|||||||
*/
|
*/
|
||||||
@Embeddable
|
@Embeddable
|
||||||
@Access(AccessType.FIELD)
|
@Access(AccessType.FIELD)
|
||||||
public final class Digest extends AbstractDigest {
|
public final class Digest extends AbstractDigest implements Serializable {
|
||||||
/**
|
/**
|
||||||
* A SHA1 digest whose content is all zeros.
|
* A SHA1 digest whose content is all zeros.
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package hirs.data.persist;
|
package hirs.data.persist;
|
||||||
|
|
||||||
|
import org.apache.commons.codec.DecoderException;
|
||||||
|
import org.apache.commons.codec.binary.Hex;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
@ -10,8 +12,7 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import org.apache.commons.codec.DecoderException;
|
import java.io.Serializable;
|
||||||
import org.apache.commons.codec.binary.Hex;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class represents a Trusted Platform Module (TPM) Platform Configuration
|
* Class represents a Trusted Platform Module (TPM) Platform Configuration
|
||||||
@ -22,7 +23,7 @@ import org.apache.commons.codec.binary.Hex;
|
|||||||
*/
|
*/
|
||||||
@Embeddable
|
@Embeddable
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
public final class TPMMeasurementRecord extends ExaminableRecord {
|
public final class TPMMeasurementRecord extends ExaminableRecord implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimum possible value for a PCR ID. This is 0.
|
* Minimum possible value for a PCR ID. This is 0.
|
||||||
|
@ -3,12 +3,14 @@ package hirs.data.persist.enums;
|
|||||||
import hirs.data.persist.AbstractDigest;
|
import hirs.data.persist.AbstractDigest;
|
||||||
import hirs.data.persist.DeviceInfoReport;
|
import hirs.data.persist.DeviceInfoReport;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum of digest algorithms. The enum values also provide a standardized
|
* Enum of digest algorithms. The enum values also provide a standardized
|
||||||
* algorithm name. The standardized algorithm name is a String of the algorithm
|
* algorithm name. The standardized algorithm name is a String of the algorithm
|
||||||
* name as defined by Java.
|
* name as defined by Java.
|
||||||
*/
|
*/
|
||||||
public enum DigestAlgorithm {
|
public enum DigestAlgorithm implements Serializable {
|
||||||
/**
|
/**
|
||||||
* MD2 digest algorithm.
|
* MD2 digest algorithm.
|
||||||
*/
|
*/
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
package hirs.data.persist.tpm;
|
package hirs.data.persist.tpm;
|
||||||
|
|
||||||
import hirs.data.persist.TPMMeasurementRecord;
|
import hirs.data.persist.TPMMeasurementRecord;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import javax.persistence.ElementCollection;
|
import javax.persistence.ElementCollection;
|
||||||
import javax.persistence.Embeddable;
|
import javax.persistence.Embeddable;
|
||||||
@ -17,6 +12,10 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Java class for PcrComposite, based on the code auto-generated using xjc
|
* Java class for PcrComposite, based on the code auto-generated using xjc
|
||||||
@ -50,7 +49,7 @@ import javax.xml.bind.annotation.XmlType;
|
|||||||
+ "Integrity_Report_v1_0#", propOrder = {"pcrSelection",
|
+ "Integrity_Report_v1_0#", propOrder = {"pcrSelection",
|
||||||
"valueSize", "pcrValueList" })
|
"valueSize", "pcrValueList" })
|
||||||
@Embeddable
|
@Embeddable
|
||||||
public class PcrComposite {
|
public class PcrComposite implements Serializable {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager
|
private static final Logger LOGGER = LogManager
|
||||||
.getLogger(PcrComposite.class);
|
.getLogger(PcrComposite.class);
|
||||||
|
@ -1,24 +1,23 @@
|
|||||||
package hirs.data.persist.tpm;
|
package hirs.data.persist.tpm;
|
||||||
|
|
||||||
import hirs.data.persist.Digest;
|
import hirs.data.persist.Digest;
|
||||||
import hirs.data.persist.enums.DigestAlgorithm;
|
|
||||||
import hirs.data.persist.TPMMeasurementRecord;
|
import hirs.data.persist.TPMMeasurementRecord;
|
||||||
|
import hirs.data.persist.enums.DigestAlgorithm;
|
||||||
|
import org.apache.commons.codec.binary.Hex;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import javax.persistence.AttributeOverride;
|
import javax.persistence.AttributeOverride;
|
||||||
import javax.persistence.AttributeOverrides;
|
import javax.persistence.AttributeOverrides;
|
||||||
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Embeddable;
|
import javax.persistence.Embeddable;
|
||||||
import javax.persistence.Embedded;
|
import javax.persistence.Embedded;
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlSchemaType;
|
import javax.xml.bind.annotation.XmlSchemaType;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
import java.io.Serializable;
|
||||||
import org.apache.commons.codec.binary.Hex;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
@ -44,7 +43,7 @@ import java.util.List;
|
|||||||
+ "Integrity_Report_v1_0#", propOrder = {"pcrSelection",
|
+ "Integrity_Report_v1_0#", propOrder = {"pcrSelection",
|
||||||
"localityAtRelease", "compositeHash", "pcrComposite" })
|
"localityAtRelease", "compositeHash", "pcrComposite" })
|
||||||
@Embeddable
|
@Embeddable
|
||||||
public class PcrInfoShort {
|
public class PcrInfoShort implements Serializable {
|
||||||
private static final Logger LOGGER = LogManager
|
private static final Logger LOGGER = LogManager
|
||||||
.getLogger(PcrInfoShort.class);
|
.getLogger(PcrInfoShort.class);
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
package hirs.data.persist.tpm;
|
package hirs.data.persist.tpm;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import java.security.InvalidParameterException;
|
import org.apache.logging.log4j.Logger;
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
import javax.persistence.Embeddable;
|
import javax.persistence.Embeddable;
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
@ -10,9 +9,10 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||||||
import javax.xml.bind.annotation.XmlAttribute;
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
import javax.xml.bind.annotation.XmlSchemaType;
|
import javax.xml.bind.annotation.XmlSchemaType;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
import java.io.Serializable;
|
||||||
import org.apache.logging.log4j.Logger;
|
import java.nio.ByteBuffer;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import java.security.InvalidParameterException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Java class for PcrSelection complex type, which was modified from code
|
* Java class for PcrSelection complex type, which was modified from code
|
||||||
@ -25,7 +25,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
namespace = "http://www.trustedcomputinggroup.org/XML/SCHEMA/"
|
namespace = "http://www.trustedcomputinggroup.org/XML/SCHEMA/"
|
||||||
+ "Integrity_Report_v1_0#")
|
+ "Integrity_Report_v1_0#")
|
||||||
@Embeddable
|
@Embeddable
|
||||||
public class PcrSelection {
|
public class PcrSelection implements Serializable {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager
|
private static final Logger LOGGER = LogManager
|
||||||
.getLogger(PcrSelection.class);
|
.getLogger(PcrSelection.class);
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
package hirs.data.persist.tpm;
|
package hirs.data.persist.tpm;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import javax.persistence.Embeddable;
|
import javax.persistence.Embeddable;
|
||||||
import javax.persistence.Embedded;
|
import javax.persistence.Embedded;
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
import java.io.Serializable;
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Java class for Quote2 complex type, which was modified from code
|
* Java class for Quote2 complex type, which was modified from code
|
||||||
@ -26,7 +27,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
namespace = "http://www.trustedcomputinggroup.org/XML/SCHEMA/"
|
namespace = "http://www.trustedcomputinggroup.org/XML/SCHEMA/"
|
||||||
+ "Integrity_Report_v1_0#", propOrder = {"quoteInfo2" })
|
+ "Integrity_Report_v1_0#", propOrder = {"quoteInfo2" })
|
||||||
@Embeddable
|
@Embeddable
|
||||||
public class Quote2 {
|
public class Quote2 implements Serializable {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger(Quote2.class);
|
private static final Logger LOGGER = LogManager.getLogger(Quote2.class);
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package hirs.data.persist.tpm;
|
package hirs.data.persist.tpm;
|
||||||
|
|
||||||
|
import org.apache.commons.codec.binary.Hex;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import javax.persistence.Embeddable;
|
import javax.persistence.Embeddable;
|
||||||
import javax.persistence.Embedded;
|
import javax.persistence.Embedded;
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
@ -10,11 +14,7 @@ import javax.xml.bind.annotation.XmlSchemaType;
|
|||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
|
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
|
||||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||||
|
import java.io.Serializable;
|
||||||
import org.apache.commons.codec.binary.Hex;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -30,7 +30,7 @@ import java.util.Arrays;
|
|||||||
namespace = "http://www.trustedcomputinggroup.org/XML/SCHEMA/"
|
namespace = "http://www.trustedcomputinggroup.org/XML/SCHEMA/"
|
||||||
+ "Integrity_Report_v1_0#", propOrder = {"pcrInfoShort" })
|
+ "Integrity_Report_v1_0#", propOrder = {"pcrInfoShort" })
|
||||||
@Embeddable
|
@Embeddable
|
||||||
public class QuoteInfo2 {
|
public class QuoteInfo2 implements Serializable {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger(QuoteInfo2.class);
|
private static final Logger LOGGER = LogManager.getLogger(QuoteInfo2.class);
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -54,7 +55,7 @@ import java.util.Arrays;
|
|||||||
+ "Integrity_Report_v1_0#",
|
+ "Integrity_Report_v1_0#",
|
||||||
propOrder = {"rawQuote", "signatureValue" })
|
propOrder = {"rawQuote", "signatureValue" })
|
||||||
@Embeddable
|
@Embeddable
|
||||||
public class QuoteSignature {
|
public class QuoteSignature implements Serializable {
|
||||||
private static final int SIGNATURE_LENGTH = 10000;
|
private static final int SIGNATURE_LENGTH = 10000;
|
||||||
|
|
||||||
@XmlElement(name = "RawQuote", required = false)
|
@XmlElement(name = "RawQuote", required = false)
|
||||||
|
Loading…
Reference in New Issue
Block a user