mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-03 03:36:49 +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.Enumerated;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
@ -26,7 +27,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Embeddable
|
||||
@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.
|
||||
*/
|
||||
|
@ -1,5 +1,7 @@
|
||||
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.Logger;
|
||||
|
||||
@ -10,8 +12,7 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Class represents a Trusted Platform Module (TPM) Platform Configuration
|
||||
@ -22,7 +23,7 @@ import org.apache.commons.codec.binary.Hex;
|
||||
*/
|
||||
@Embeddable
|
||||
@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.
|
||||
|
@ -3,12 +3,14 @@ package hirs.data.persist.enums;
|
||||
import hirs.data.persist.AbstractDigest;
|
||||
import hirs.data.persist.DeviceInfoReport;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Enum of digest algorithms. The enum values also provide a standardized
|
||||
* algorithm name. The standardized algorithm name is a String of the algorithm
|
||||
* name as defined by Java.
|
||||
*/
|
||||
public enum DigestAlgorithm {
|
||||
public enum DigestAlgorithm implements Serializable {
|
||||
/**
|
||||
* MD2 digest algorithm.
|
||||
*/
|
||||
|
@ -1,13 +1,8 @@
|
||||
package hirs.data.persist.tpm;
|
||||
|
||||
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.Logger;
|
||||
|
||||
import javax.persistence.ElementCollection;
|
||||
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.XmlElement;
|
||||
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
|
||||
@ -50,7 +49,7 @@ import javax.xml.bind.annotation.XmlType;
|
||||
+ "Integrity_Report_v1_0#", propOrder = {"pcrSelection",
|
||||
"valueSize", "pcrValueList" })
|
||||
@Embeddable
|
||||
public class PcrComposite {
|
||||
public class PcrComposite implements Serializable {
|
||||
|
||||
private static final Logger LOGGER = LogManager
|
||||
.getLogger(PcrComposite.class);
|
||||
|
@ -1,24 +1,23 @@
|
||||
package hirs.data.persist.tpm;
|
||||
|
||||
import hirs.data.persist.Digest;
|
||||
import hirs.data.persist.enums.DigestAlgorithm;
|
||||
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.AttributeOverrides;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.Column;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
@ -44,7 +43,7 @@ import java.util.List;
|
||||
+ "Integrity_Report_v1_0#", propOrder = {"pcrSelection",
|
||||
"localityAtRelease", "compositeHash", "pcrComposite" })
|
||||
@Embeddable
|
||||
public class PcrInfoShort {
|
||||
public class PcrInfoShort implements Serializable {
|
||||
private static final Logger LOGGER = LogManager
|
||||
.getLogger(PcrInfoShort.class);
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
package hirs.data.persist.tpm;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.Arrays;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.persistence.Embeddable;
|
||||
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.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import java.io.Serializable;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 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/"
|
||||
+ "Integrity_Report_v1_0#")
|
||||
@Embeddable
|
||||
public class PcrSelection {
|
||||
public class PcrSelection implements Serializable {
|
||||
|
||||
private static final Logger LOGGER = LogManager
|
||||
.getLogger(PcrSelection.class);
|
||||
|
@ -1,14 +1,15 @@
|
||||
package hirs.data.persist.tpm;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.persistence.Embeddable;
|
||||
import javax.persistence.Embedded;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 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/"
|
||||
+ "Integrity_Report_v1_0#", propOrder = {"quoteInfo2" })
|
||||
@Embeddable
|
||||
public class Quote2 {
|
||||
public class Quote2 implements Serializable {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger(Quote2.class);
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
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.Embedded;
|
||||
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.adapters.NormalizedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Arrays;
|
||||
@ -30,7 +30,7 @@ import java.util.Arrays;
|
||||
namespace = "http://www.trustedcomputinggroup.org/XML/SCHEMA/"
|
||||
+ "Integrity_Report_v1_0#", propOrder = {"pcrInfoShort" })
|
||||
@Embeddable
|
||||
public class QuoteInfo2 {
|
||||
public class QuoteInfo2 implements Serializable {
|
||||
|
||||
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.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
@ -54,7 +55,7 @@ import java.util.Arrays;
|
||||
+ "Integrity_Report_v1_0#",
|
||||
propOrder = {"rawQuote", "signatureValue" })
|
||||
@Embeddable
|
||||
public class QuoteSignature {
|
||||
public class QuoteSignature implements Serializable {
|
||||
private static final int SIGNATURE_LENGTH = 10000;
|
||||
|
||||
@XmlElement(name = "RawQuote", required = false)
|
||||
|
Loading…
Reference in New Issue
Block a user