Create ACA_SwidTag project

This commit is contained in:
chubtub 2019-12-26 12:33:59 -05:00
parent 0f3cfeb7b5
commit 2052599153
65 changed files with 8673 additions and 0 deletions

View File

@ -0,0 +1,32 @@
Name: ACA_SwidTag
Version: 1.0
Release: 1%{?dist}
Summary: A java command-line tool to create swidtags
License: ASL 2.0
URL: https://github.com/nsacyber/HIRS
Source0: %{name}.tar.gz
BuildRequires: java-headless >= 1:1.8.0
%description
This tool will generate a valid swidtag file in accordance with the schema located at http://standards.iso.org/iso/19770/-2/2015/schema.xsd. The generated swidtag can either be empty if no arguments are given, or contain a payload if an input file is specified. The tool can also verify a given swidtag file against the schema. Use -h or --help to see a list of commands and uses.
%prep
%setup -q -c -n %{name}
%build
./gradlew build
%install
mkdir -p %{buildroot}/opt/hirs/swidtag/
cp build/libs/%{name}-%{version}.jar %{buildroot}/opt/hirs/swidtag/
%files
/opt/hirs/swidtag/%{name}-%{version}.jar
%changelog
* Mon Dec 23 2019 chubtub
- First change

Binary file not shown.

24
ACA_SwidTag/build.gradle Normal file
View File

@ -0,0 +1,24 @@
apply plugin: 'java'
version = '1.0'
repositories {
mavenCentral()
}
dependencies {
testCompile 'org.testng:testng:6.8.8'
}
jar {
manifest {
attributes("Main-Class": "hirs.swid.Main")
}
}
uploadArchives {
repositories {
flatDir {
dirs "${buildDir}"
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,6 @@
#Thu Sep 13 15:33:27 EDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=gradle-4.5.1-all.zip

160
ACA_SwidTag/gradlew vendored Executable file
View File

@ -0,0 +1,160 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
ACA_SwidTag/gradlew.bat vendored Normal file
View File

@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

BIN
ACA_SwidTag/libs/sax2r2.jar Normal file

Binary file not shown.

17
ACA_SwidTag/package.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Enter package directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd $SCRIPT_DIR
name="ACA_SwidTag"
tar -cf $name.tar build.gradle gradle* src/ docs/
gzip $name.tar
if [ -d rpmbuild ]; then
rm -rf rpmbuild
fi
mkdir -p rpmbuild/BUILD rpmbuild/BUILDROOT rpmbuild/SOURCES rpmbuild/RPMS rpmbuild/SPECS rpmbuild/SRPMS
rpmbuild -bb $name.spec --define "_sourcedir $PWD" --define "_topdir $PWD/rpmbuild"
popd

View File

@ -0,0 +1,44 @@
package hirs.swid;
import hirs.swid.utils.Commander;
import java.io.IOException;
/*
* Command-line application for generating and validating SWID tags.
* Input arg: path to *.swidtag file
*
* If an argument is given it will be validated against the schema at http://standards.iso.org/iso/19770/-2/2015/schema.xsd
* If an argument is not given a SWID tag file will be generated.
*/
public class Main {
public static void main(String[] args) {
Commander commander = new Commander(args);
if (commander.hasArguments()) {
// we have arguments to work with
if (commander.create()) {
// parsing the arguments detected a create parameter (-c)
(new SwidTagGateway()).generateSwidTag(commander.getCreateInFile(),
commander.getCreateOutFile(), commander.getHashAlg());
} else if (commander.validate()) {
// parsing the arguments detected a validation parameter (-v)
try {
(new SwidTagGateway()).validateSwidTag(commander.getValidateFile());
} catch (IOException e) {
System.out.println("Unable to validate file: " + e.getMessage());
}
} else if (commander.parse()) {
try {
(new SwidTagGateway()).parsePayload(commander.getParseFile());
} catch (IOException e) {
System.out.println("Unable to parse file: " + e.getMessage());
}
}
} else {
// development stage in which no valid arguments were given
// therefore generate a mock tag file
(new SwidTagGateway()).generateSwidTag();
}
}
}

View File

@ -0,0 +1,65 @@
package hirs.swid;
import javax.xml.XMLConstants;
/**
* This class contains the String constants that are referenced by the gateway
* class. It is expected that member properties of this class will expand as
* more functionality is added to SwidTagGateway.
*
*/
public class SwidTagConstants {
public static final String SCHEMA_STATEMENT = "ISO/IEC 19770-2:2015 Schema (XSD 1.0) "
+ "- September 2015, see http://standards.iso.org/iso/19770/-2/2015/schema.xsd";
public static final String SCHEMA_PACKAGE = "hirs.swid.xjc";
public static final String SCHEMA_LANGUAGE = XMLConstants.W3C_XML_SCHEMA_NS_URI;
public static final String SCHEMA_URL = "swid_schema.xsd";
public static final String HIRS_SWIDTAG_HEADERS = "hirsSwidTagHeader.properties";
public static final String EXAMPLE_PROPERTIES = "swidExample.properties";
public static final String SOFTWARE_IDENTITY_NAME = "softwareIdentity.name";
public static final String SOFTWARE_IDENTITY_TAGID = "softwareIdentity.tagId";
public static final String SOFTWARE_IDENTITY_VERSION = "softwareIdentity.version";
public static final String SOFTWARE_IDENTITY_CORPUS = "softwareIdentity.corpus";
public static final String SOFTWARE_IDENTITY_PATCH = "softwareIdentity.patch";
public static final String SOFTWARE_IDENTITY_SUPPLEMENTAL = "softwareIdentity.supplemental";
public static final String ENTITY_NAME = "entity.name";
public static final String ENTITY_REGID = "entity.regid";
public static final String ENTITY_ROLE = "entity.role";
public static final String ENTITY_THUMBPRINT = "entity.thumbprint";
public static final String LINK_HREF = "link.href";
public static final String LINK_REL = "link.rel";
public static final String META_PCURILOCAL = "softwareMeta.pcUriLocal";
public static final String META_BINDINGSPEC = "softwareMeta.bindingSpec";
public static final String META_BINDINGSPECVERSION = "softwareMeta.bindingSpecVersion";
public static final String META_PLATFORMMANUFACTURERID = "softwareMeta.platformManufacturerId";
public static final String META_PLATFORMMANUFACTURERSTR = "softwareMeta.platformManufacturerStr";
public static final String META_PLATFORMMODEL = "softwareMeta.platformModel";
public static final String META_COMPONENTCLASS = "softwareMeta.componentClass";
public static final String META_COMPONENTMANUFACTURER = "softwareMeta.componentManufacturer";
public static final String META_COMPONENTMANUFACTURERID = "softwareMeta.componentManufacturerId";
public static final String META_RIMLINKHASH = "softwareMeta.rimLinkHash";
public static final String PAYLOAD_ENVVARPREFIX = "n8060.envvarprefix";
public static final String PAYLOAD_ENVVARSUFFIX = "n8060.envvarsuffix";
public static final String PAYLOAD_PATHSEPARATOR = "n8060.pathseparator";
public static final String DIRECTORY_KEY = "directory.key";
public static final String DIRECTORY_LOCATION = "directory.location";
public static final String DIRECTORY_NAME = "directory.name";
public static final String DIRECTORY_ROOT = "directory.root";
public static final String FILE_KEY = "file.key";
public static final String FILE_LOCATION = "file.location";
public static final String FILE_NAME = "file.name";
public static final String FILE_ROOT = "file.root";
public static final String FILE_SIZE = "file.size";
public static final String FILE_VERSION = "file.version";
public static final int PCR_NUMBER = 0;
public static final int PCR_VALUE = 1;
}

View File

@ -0,0 +1,553 @@
package hirs.swid;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.UnmarshalException;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.namespace.QName;
import org.xml.sax.SAXException;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import hirs.swid.utils.CsvParser;
import hirs.swid.utils.HashSwid;
import hirs.swid.xjc.CanonicalizationMethodType;
import hirs.swid.xjc.DigestMethodType;
import hirs.swid.xjc.Directory;
import hirs.swid.xjc.Entity;
import hirs.swid.xjc.Link;
import hirs.swid.xjc.ObjectFactory;
import hirs.swid.xjc.ResourceCollection;
import hirs.swid.xjc.ReferenceType;
import hirs.swid.xjc.SignatureType;
import hirs.swid.xjc.SignatureValueType;
import hirs.swid.xjc.SignatureMethodType;
import hirs.swid.xjc.SignedInfoType;
import hirs.swid.xjc.SoftwareIdentity;
import hirs.swid.xjc.SoftwareMeta;
import hirs.swid.xjc.TransformType;
import hirs.swid.xjc.TransformsType;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
/**
* This class provides interaction with the SWID Tag schema as defined in
* http://standards.iso.org/iso/19770/-2/2015/schema.xsd
*
*/
public class SwidTagGateway {
private static final QName _DEFAULT_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SHA256", "ds");
private static final QName _SHA1Value_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SHA1", "ds");
private static final QName _SHA384Value_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SHA384", "ds");
private static final QName _SHA512Value_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SHA512", "ds");
private static final QName _SHA256_HASH = new QName(
"http://www.w3.org/2001/04/xmlenc#sha256", "hash", "SHA256");
private static final QName _RIM_PCURILOCAL = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"pcURILocal", "rim");
private static final QName _RIM_BINDINGSPEC = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"bindingSpec", "rim");
private static final QName _RIM_BINDINGSPECVERSION = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"bindingSpecVersion", "rim");
private static final QName _RIM_PLATFORMMANUFACTURERID = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"platformManufacturerId", "rim");
private static final QName _RIM_PLATFORMMANUFACTURERSTR = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"platformManufacturerStr", "rim");
private static final QName _RIM_PLATFORMMODEL = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"platformModel", "rim");
private static final QName _RIM_COMPONENTCLASS = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"componentClass", "rim");
private static final QName _RIM_COMPONENTMANUFACTURER = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"componentManufacturer", "rim");
private static final QName _RIM_COMPONENTMANUFACTURERID = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"componentManufacturerId", "rim");
private static final QName _RIM_RIMLINKHASH = new QName(
"https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model",
"rimLinkHash", "rim");
private static final QName _N8060_ENVVARPREFIX = new QName(
"http://csrc.nist.gov/ns/swid/2015-extensions/1.0",
"envVarPrefix", "n8060");
private static final QName _N8060_ENVVARSUFFIX = new QName(
"http://csrc.nist.gov/ns/swid/2015-extensions/1.0",
"envVarSuffix", "n8060");
private static final QName _N8060_PATHSEPARATOR = new QName(
"http://csrc.nist.gov/ns/swid/2015-extensions/1.0",
"pathSeparator", "n8060");
private final ObjectFactory objectFactory = new ObjectFactory();
private final File generatedFile = new File("generated_swidTag.swidtag");
private QName hashValue = null;
private static final String ENTITY = "Entity";
private static final String PAYLOAD = "Payload";
/**
* default generator method that has no parameters
*/
public void generateSwidTag() {
generateSwidTag(generatedFile);
}
/**
* This generator method is used by the create method.
*
* @param inputFile - the file in csv format that is used as data
* @param outputFile - output specific to the given file
* @param hashType - the optional labeling of the hash type
*/
public void generateSwidTag(final String inputFile,
final String outputFile, final String hashType) {
// create file instances
File input = new File(inputFile);
File output = new File(outputFile);
List<String> tempList = new LinkedList<>();
// I need to go over this again about which needs to be checked.
if (input.exists()) {
// parse the csv file
CsvParser parser = new CsvParser(input);
for (String line : parser.getContent()) {
tempList.add(line);
}
if (hashType.contains("256")) {
hashValue = _DEFAULT_QNAME;
} else if (hashType.contains("384")) {
hashValue = _SHA384Value_QNAME;
} else if (hashType.contains("512")) {
hashValue = _SHA512Value_QNAME;
} else if (hashType.contains("1")) {
hashValue = _SHA1Value_QNAME;
} else {
hashValue = _DEFAULT_QNAME;
}
// generate a swid tag
Properties properties = new Properties();
InputStream is = null;
try {
is = SwidTagGateway.class.getClassLoader().getResourceAsStream(SwidTagConstants.HIRS_SWIDTAG_HEADERS);
properties.load(is);
SoftwareIdentity swidTag = createSwidTag(properties);
JAXBElement<Entity> entity = objectFactory.createSoftwareIdentityEntity(createEntity(properties));
swidTag.getEntityOrEvidenceOrLink().add(entity);
// we should have resources, there for we need a collection
JAXBElement<ResourceCollection> resources = objectFactory.createSoftwareIdentityPayload(createPayload(tempList, hashValue));
swidTag.getEntityOrEvidenceOrLink().add(resources);
JAXBElement<SoftwareIdentity> jaxbe = objectFactory.createSoftwareIdentity(swidTag);
writeSwidTagFile(jaxbe, output);
} catch (IOException e) {
System.out.println("Error reading properties file: ");
e.printStackTrace();
} finally {
if (is != null) {
try {
is.close();
} catch (IOException ex) {
// ignore
}
}
}
}
}
/**
* This method generates a primary SWID tag from the values in
* resources/swidExamples.properties
*
* @param outputFile
*/
public void generateSwidTag(final File outputFile) {
Properties properties = new Properties();
InputStream is = null;
try {
is = SwidTagGateway.class.getClassLoader().getResourceAsStream(SwidTagConstants.EXAMPLE_PROPERTIES);
properties.load(is);
SoftwareIdentity swidTag = createSwidTag(properties);
JAXBElement<Entity> entity = objectFactory.createSoftwareIdentityEntity(createEntity(properties));
swidTag.getEntityOrEvidenceOrLink().add(entity);
JAXBElement<Link> link = objectFactory.createSoftwareIdentityLink(createLink(properties));
swidTag.getEntityOrEvidenceOrLink().add(link);
JAXBElement<SoftwareMeta> meta = objectFactory.createSoftwareIdentityMeta(createSoftwareMeta(properties));
swidTag.getEntityOrEvidenceOrLink().add(meta);
ResourceCollection payload = createPayload(properties);
Directory directory = createDirectory(properties);
hirs.swid.xjc.File file1 = createFile("Example.com.iotBase.bin", "01.00", "15400");
hirs.swid.xjc.File file2 = createFile("iotExec.bin", "01.00", "1024");
directory.getDirectoryOrFile().add(file1);
directory.getDirectoryOrFile().add(file2);
payload.getDirectoryOrFileOrProcess().add(directory);
JAXBElement<ResourceCollection> jaxbPayload = objectFactory.createSoftwareIdentityPayload(payload);
swidTag.getEntityOrEvidenceOrLink().add(jaxbPayload);
// JAXBElement<SignatureType> swidtagSignature = objectFactory.createSignature(createSignature());
// swidTag.getEntityOrEvidenceOrLink().add(swidtagSignature);
JAXBElement<SoftwareIdentity> jaxbe = objectFactory.createSoftwareIdentity(swidTag);
writeSwidTagFile(jaxbe, outputFile);
} catch (IOException e) {
System.out.println("Error reading properties file: ");
e.printStackTrace();
} finally {
if (is != null) {
try {
is.close();
} catch (IOException ex) {
// ignore
}
}
}
}
/**
* This method validates the .swidtag file at the given filepath against the
* schema. A successful validation results in the output of the tag's name
* and tagId attributes.
*
* @param path the location of the file to be validated
*/
public boolean validateSwidTag(String path) throws IOException {
JAXBElement jaxbe = unmarshallSwidTag(path);
SoftwareIdentity swidTag = (SoftwareIdentity) jaxbe.getValue();
String output = String.format("name: %s;\ntagId: %s\n%s",
swidTag.getName(), swidTag.getTagId(),
SwidTagConstants.SCHEMA_STATEMENT);
System.out.println("SWID Tag found: ");
System.out.println(output);
return true;
}
public void writeSwidTagFile(JAXBElement<SoftwareIdentity> jaxbe, File outputFile) {
JAXBContext jaxbContext;
try {
jaxbContext = JAXBContext.newInstance(SwidTagConstants.SCHEMA_PACKAGE);
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshaller.marshal(jaxbe, outputFile);
} catch (JAXBException e) {
System.out.println("Error generating xml: ");
e.printStackTrace();
}
}
/**
* Given an input swidtag at <path> parse any PCRs in the payload into an InputStream object
*/
public ByteArrayInputStream parsePayload(String path) throws IOException {
JAXBElement jaxbe = unmarshallSwidTag(path);
SoftwareIdentity softwareIdentity = (SoftwareIdentity) jaxbe.getValue();
String pcrs = "";
if (!softwareIdentity.getEntityOrEvidenceOrLink().isEmpty()) {
List<Object> swidtag = softwareIdentity.getEntityOrEvidenceOrLink();
for (Object obj : swidtag) {
try {
JAXBElement element = (JAXBElement) obj;
String elementName = element.getName().getLocalPart();
if (elementName.equals(PAYLOAD)) {
ResourceCollection rc = (ResourceCollection) element.getValue();
if (!rc.getDirectoryOrFileOrProcess().isEmpty()) {
pcrs = parsePCRs(rc.getDirectoryOrFileOrProcess());
}
}
} catch (ClassCastException e) {
System.out.println("Found a non-JAXBElement object!" + e.getMessage());
throw new IOException("Found an invalid element in the swidtag file!");
}
}
}
return new ByteArrayInputStream(pcrs.getBytes(StandardCharsets.UTF_8));
}
/**
* This method sets up the standard information for the swig tag, provided
* by the property file.
*
* @param properties the Properties object containing parameters from file
* @return SoftwareIdentity object created from the properties
*/
private SoftwareIdentity createSwidTag(Properties properties) {
SoftwareIdentity swidTag = objectFactory.createSoftwareIdentity();
swidTag.setName(properties.getProperty(SwidTagConstants.SOFTWARE_IDENTITY_NAME));
swidTag.setTagId(properties.getProperty(SwidTagConstants.SOFTWARE_IDENTITY_TAGID));
swidTag.setVersion(properties.getProperty(SwidTagConstants.SOFTWARE_IDENTITY_VERSION));
swidTag.setCorpus(Boolean.parseBoolean(properties.getProperty(SwidTagConstants.SOFTWARE_IDENTITY_CORPUS)));
swidTag.setPatch(Boolean.parseBoolean(properties.getProperty(SwidTagConstants.SOFTWARE_IDENTITY_PATCH)));
swidTag.setSupplemental(Boolean.parseBoolean(properties.getProperty(SwidTagConstants.SOFTWARE_IDENTITY_SUPPLEMENTAL)));
return swidTag;
}
/**
* This method creates an Entity object based on the parameters read in from
* a properties file.
*
* @param properties the Properties object containing parameters from file
* @return Entity object created from the properties
*/
private Entity createEntity(Properties properties) {
Entity entity = objectFactory.createEntity();
entity.setName(properties.getProperty(SwidTagConstants.ENTITY_NAME));
entity.setRegid(properties.getProperty(SwidTagConstants.ENTITY_REGID));
String[] roles = properties.getProperty(SwidTagConstants.ENTITY_ROLE).split(",");
for (int i = 0; i < roles.length; i++) {
entity.getRole().add(roles[i]);
}
entity.setThumbprint(properties.getProperty(SwidTagConstants.ENTITY_THUMBPRINT));
return entity;
}
private Link createLink(Properties properties) {
Link link = objectFactory.createLink();
link.setHref(properties.getProperty(SwidTagConstants.LINK_HREF));
link.setRel(properties.getProperty(SwidTagConstants.LINK_REL));
return link;
}
private SoftwareMeta createSoftwareMeta(Properties properties) {
SoftwareMeta softwareMeta = objectFactory.createSoftwareMeta();
Map<QName, String> attributes = softwareMeta.getOtherAttributes();
attributes.put(_RIM_PCURILOCAL, properties.getProperty(SwidTagConstants.META_PCURILOCAL));
attributes.put(_RIM_BINDINGSPEC, properties.getProperty(SwidTagConstants.META_BINDINGSPEC));
attributes.put(_RIM_BINDINGSPECVERSION, properties.getProperty(SwidTagConstants.META_BINDINGSPECVERSION));
attributes.put(_RIM_PLATFORMMANUFACTURERID, properties.getProperty(SwidTagConstants.META_PLATFORMMANUFACTURERID));
attributes.put(_RIM_PLATFORMMANUFACTURERSTR, properties.getProperty(SwidTagConstants.META_PLATFORMMANUFACTURERSTR));
attributes.put(_RIM_PLATFORMMODEL, properties.getProperty(SwidTagConstants.META_PLATFORMMODEL));
attributes.put(_RIM_COMPONENTCLASS, properties.getProperty(SwidTagConstants.META_COMPONENTCLASS));
attributes.put(_RIM_COMPONENTMANUFACTURER, properties.getProperty(SwidTagConstants.META_COMPONENTMANUFACTURER));
attributes.put(_RIM_COMPONENTMANUFACTURERID, properties.getProperty(SwidTagConstants.META_COMPONENTMANUFACTURERID));
attributes.put(_RIM_RIMLINKHASH, properties.getProperty(SwidTagConstants.META_RIMLINKHASH));
return softwareMeta;
}
/**
* This method uses the property file to create and populate a Directory
* object.
*
* @param properties
* @return Directory object created from the properties
*/
private Directory createDirectory(Properties properties) {
Directory directory = objectFactory.createDirectory();
directory.setLocation(properties.getProperty(SwidTagConstants.DIRECTORY_LOCATION));
directory.setName(properties.getProperty(SwidTagConstants.DIRECTORY_NAME));
String directoryRoot = properties.getProperty(SwidTagConstants.DIRECTORY_ROOT);
if (!directoryRoot.isEmpty()) {
directory.setRoot(directoryRoot);
}
return directory;
}
/**
* This method creates a File object specific for the SwidTag formatting.
* This version of the method takes a java.nio.File object and produces an
* object that represents it out of the hirs.swid.xjc library
*
* @param file
* @return hirs.swid.xjc.File object from File object
*/
private hirs.swid.xjc.File createFile(File file) {
return createFile(file.getName(), "01.00", Long.toString(file.length()));
}
/**
*
* @param filename
* @param location
* @return hirs.swid.xjc.File object from File object
*/
private hirs.swid.xjc.File createFile(String filename, String version, String size) {
hirs.swid.xjc.File file = objectFactory.createFile();
file.setName(filename);
file.setVersion(version);
file.setSize(new BigInteger(size));
String hash = HashSwid.get256Hash(file.getName());
file.getOtherAttributes().put(_SHA256_HASH, hash);
return file;
}
/**
*
* @param properties
* @return
*/
private ResourceCollection createPayload(Properties properties) {
ResourceCollection rc = objectFactory.createResourceCollection();
rc.getOtherAttributes().put(_N8060_ENVVARPREFIX, properties.getProperty(SwidTagConstants.PAYLOAD_ENVVARPREFIX));
rc.getOtherAttributes().put(_N8060_ENVVARSUFFIX, properties.getProperty(SwidTagConstants.PAYLOAD_ENVVARSUFFIX));
rc.getOtherAttributes().put(_N8060_PATHSEPARATOR, properties.getProperty(SwidTagConstants.PAYLOAD_PATHSEPARATOR));
return rc;
}
/**
*
* @param populate
* @return
*/
private ResourceCollection createPayload(List<String> populate, QName hashStr) {
ResourceCollection rc = objectFactory.createResourceCollection();
hirs.swid.xjc.File xjcFile = null;
String[] tempArray = null;
for (String item : populate) {
xjcFile = objectFactory.createFile();
tempArray = item.split(",");
xjcFile.setName(tempArray[SwidTagConstants.PCR_NUMBER]);
xjcFile.getOtherAttributes().put(hashStr, tempArray[SwidTagConstants.PCR_VALUE]);
rc.getDirectoryOrFileOrProcess().add(xjcFile);
}
return rc;
}
/**
* Incomplete, and not yet implemented.
* @return
*/
private SignatureType createSignature() {
SignatureType signature = objectFactory.createSignatureType();
SignedInfoType signedInfo = objectFactory.createSignedInfoType();
CanonicalizationMethodType canonicalizationMethod = objectFactory.createCanonicalizationMethodType();
canonicalizationMethod.setAlgorithm("http://www.w3.org/TR/2001/REC-xml-c14n-20010315");
SignatureMethodType signatureMethod = objectFactory.createSignatureMethodType();
signatureMethod.setAlgorithm("http://www.w3.org/2000/09/xmldsig#rsa-sha512");
ReferenceType reference = objectFactory.createReferenceType();
TransformsType transforms = objectFactory.createTransformsType();
TransformType transform = objectFactory.createTransformType();
transform.setAlgorithm("http://www.w3.org/2000/09/xmldsig#enveloped-signature");
transforms.getTransform().add(transform);
DigestMethodType digestMethod = objectFactory.createDigestMethodType();
digestMethod.setAlgorithm("http://www.w3.org/2000/09/xmldsig#sha256");
reference.setTransforms(transforms);
reference.setDigestMethod(digestMethod);
reference.setDigestValue(new byte[10]);
signedInfo.setCanonicalizationMethod(canonicalizationMethod);
signedInfo.setSignatureMethod(signatureMethod);
signedInfo.getReference().add(reference);
SignatureValueType signatureValue = objectFactory.createSignatureValueType();
signatureValue.setValue(new byte[10]);
signature.setSignedInfo(signedInfo);
return signature;
}
private String parsePCRs(List list) {
final String newline = System.lineSeparator();
StringBuilder sb = new StringBuilder();
for (Object listItem : list) {
if (listItem instanceof Directory) {
Directory dir = (Directory) listItem;
if (!dir.getDirectoryOrFile().isEmpty()) {
parsePCRs(dir.getDirectoryOrFile());
}
} else if (listItem instanceof hirs.swid.xjc.File){
hirs.swid.xjc.File pcr = (hirs.swid.xjc.File) listItem;
String pcrHash = "";
if (!pcr.getOtherAttributes().isEmpty()) {
Object[] fileAttributes = pcr.getOtherAttributes().values().toArray();
pcrHash = (String) fileAttributes[0];
}
if (pcrHash.isEmpty()) {
pcrHash = "null";
}
sb.append(pcr.getName() + "," + pcrHash + newline);
}
}
System.out.println(sb.toString());
return sb.toString();
}
private JAXBElement unmarshallSwidTag(String path) throws IOException {
File input = null;
InputStream is = null;
JAXBElement jaxbe = null;
try {
input = new File(path);
is = SwidTagGateway.class.getClassLoader().getResourceAsStream(SwidTagConstants.SCHEMA_URL);
SchemaFactory schemaFactory = SchemaFactory.newInstance(SwidTagConstants.SCHEMA_LANGUAGE);
Schema schema = schemaFactory.newSchema(new StreamSource(is));
JAXBContext jaxbContext = JAXBContext.newInstance(SwidTagConstants.SCHEMA_PACKAGE);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setSchema(schema);
jaxbe = (JAXBElement) unmarshaller.unmarshal(input);
} catch (SAXException e) {
System.out.println("Error setting schema for validation!");
} catch (UnmarshalException e) {
System.out.println("Error validating swidtag file!");
} catch (IllegalArgumentException e) {
System.out.println("Input file empty.");
} catch (JAXBException e) {
e.printStackTrace();
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
System.out.println("Error closing input stream");
}
}
if (jaxbe != null) {
return jaxbe;
} else {
throw new IOException("Invalid swidtag file!");
}
}
}
}

View File

@ -0,0 +1,274 @@
package hirs.swid.utils;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.Paths;
/**
* Commander is a class that handles the command line arguments for the SWID
* Tags gateway.
*/
public class Commander {
private static final String COMMAND_PREFIX = "-";
private static final String FULL_COMMAND_PREFIX = "--";
private static final String CREATE_STRING = "create";
private static final String VERIFY_STRING = "verify";
private static final String HELP_STRING = "help";
private static final String EXAMPLE_STRING = "example";
private static final String PARSE_STRING = "parse";
private static final String IN_STRING = "in";
private static final String OUT_STRING = "out";
private static final String HASH_STRING = "hash";
private boolean hasArguments = false;
private boolean validate = false;
private boolean create = false;
private boolean parse = false;
private String validateFile;
private String createInFile;
private String createOutFile;
private String parseFile;
private String hashAlg = null;
/**
* The main constructor for the Commander class
*
* @param args
*/
public Commander(final String[] args) {
hasArguments = args.length > 0;
if (hasArguments) {
parseArguments(args);
} else {
//printHelp();
}
if (create) {
if (!Files.exists(Paths.get(getCreateInFile()))) {
create = false;
printHelp("Input file doesn't exist...");
}
if (hashAlg == null) {
hashAlg = "256";
}
if (!isValidPath(getCreateOutFile())) {
printHelp(String.format("Invalid file path on creation file...(%s)",
getCreateOutFile()));
}
}
if (validate && create) {
// there maybe a time in which you could validate what you created
// but not right now
// print the help information
printHelp();
}
}
/**
* The default blank constructor
*/
public Commander() {
}
/**
* This method is called if an empty Commander was created, and later gets
* args. Will be used by the main constructor.
*
* @param args
*/
public final void parseArguments(final String[] args) {
String tempValue;
for (int i = 0; i < args.length; i++) {
tempValue = args[i];
switch (tempValue) {
case FULL_COMMAND_PREFIX + CREATE_STRING:
case COMMAND_PREFIX + "c":
create = true;
break;
case COMMAND_PREFIX + IN_STRING:
if (create) {
createInFile = args[++i];
}
break;
case COMMAND_PREFIX + OUT_STRING:
if (create) {
createOutFile = args[++i];
}
break;
case FULL_COMMAND_PREFIX + VERIFY_STRING:
case COMMAND_PREFIX + "v":
validate = true;
validateFile = args[++i];
break;
case FULL_COMMAND_PREFIX + EXAMPLE_STRING:
case COMMAND_PREFIX + "e":
hasArguments = false;
return; // default is generate
case COMMAND_PREFIX + HASH_STRING:
hashAlg = args[++i];
break;
case FULL_COMMAND_PREFIX + PARSE_STRING:
case COMMAND_PREFIX + "p":
parse = true;
parseFile = args[++i];
break;
case FULL_COMMAND_PREFIX + HELP_STRING:
case COMMAND_PREFIX + "h":
default:
if (Files.exists(Paths.get(args[i]))) {
validate = true;
validateFile = args[i];
break;
}
printHelp();
}
}
}
/**
* Getter for the input validate file associated with the validate flag
*
* @return
*/
public final String getValidateFile() {
return validateFile;
}
/**
* Getter for the input create file associated with the create flag
*
* @return
*/
public final String getCreateInFile() {
return createInFile;
}
/**
* Getter for the output file for the create flag
*
* @return
*/
public final String getCreateOutFile() {
return createOutFile;
}
/**
* Getter for the property that indicates if something was given at the
* commandline.
*
* @return
*/
public final boolean hasArguments() {
return hasArguments;
}
/**
* Getter for the validate command flag.
*
* @return
*/
public final boolean validate() {
return validate;
}
/**
* Getter for the create command flag.
*
* @return
*/
public final boolean create() {
return create;
}
/**
* Getter for the hash algorithm to be used for hash functions.
*
* @return
*/
public final String getHashAlg() {
return hashAlg;
}
/**
* Getter for the parse command flag
*
* @return
*/
public final boolean parse() {
return parse;
}
/**
* Getter for the file to be parsed by the parse command flag
*
* @return
*/
public final String getParseFile() {
return parseFile;
}
/**
* Default no parameter help method.
*/
private void printHelp() {
printHelp(null);
}
/**
* This method is used to inform the user of the allowed functionality of
* the program.
*/
private void printHelp(String message) {
StringBuilder sb = new StringBuilder();
if (message != null && !message.isEmpty()) {
sb.append(String.format("ERROR: %s\n\n", message));
}
sb.append("Usage: HIRS_SwidTag\n");
sb.append(" -c, --create \tTakes given input in the csv format\n"
+ " \t-in <file>\tand produces swidtag payloads.\n"
+ " \t-out <file>\tThe -hash argument is optional.\n"
+ " \t-hash <algorithm>\n");
sb.append(" -v, --verify\t\tTakes the provided input file and\n"
+ " \t\t\tvalidates it against the schema at\n"
+ " \t\t\thttp://standards.iso.org/iso/19770/-2/2015/schema.xsd\n");
sb.append(" -e, --example\tCreate example swid tag file (generated_swidTag.swidtag)\n");
sb.append(" -h, --help\t\tPrints the command help information\n");
sb.append(" <no file>\t\tListing no command with no argument will\n"
+ " \t\t\tcreate an example tag file\n");
sb.append(" <file>\t\tValidate the given file argument\n");
sb.append(" -p, --parse\t\tParse a swidtag's payload\n"
+ " <file>\t\tInput swidtag");
System.out.println(sb.toString());
System.exit(1);
}
/**
* Checks that the file given to create a new swidtag is a valid path.
* @param filepath
* @return
*/
public static boolean isValidPath(String filepath) {
try {
System.out.println("Checking for a valid creation path...");
File file = new File(filepath);
file.createNewFile();
} catch (IOException | InvalidPathException | NullPointerException ex) {
return false;
}
return true;
}
}

View File

@ -0,0 +1,136 @@
package hirs.swid.utils;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
*
*/
public class CsvParser {
private static final char DEFAULT_SEPARATOR = ',';
private static final char DEFAULT_QUOTE = '"';
private List<String> content;
public CsvParser(final File file) {
this(file.getAbsolutePath());
}
public CsvParser(final String csvfile) {
content = readerCsv(csvfile);
}
/**
* This method takes an existing csv file and reads the file by line and
* adds the contents to a list of Strings.
*
* @param file valid path to a csv file
* @return
*/
private List<String> readerCsv(final String file) {
String line = "";
String csvSplitBy = ",";
List<String> tempList = new LinkedList<>();
try (BufferedReader br = new BufferedReader(new FileReader(file))) {
while ((line = br.readLine()) != null) {
if (line.length() > 0
&& line.contains(csvSplitBy)) {
tempList.add(line);
}
}
} catch (IOException ioEx) {
System.out.println(String.format("Error reading in CSV file...(%s)", file));
System.exit(1);
}
return tempList;
}
public final List<String> getContent() {
return Collections.unmodifiableList(content);
}
public static List<String> parseLine(String csvLine) {
return parseLine(csvLine, DEFAULT_SEPARATOR, DEFAULT_QUOTE);
}
public static List<String> parseLine(String csvLine, char separators) {
return parseLine(csvLine, separators, DEFAULT_QUOTE);
}
public static List<String> parseLine(String csvLine, char separators, char customQuote) {
List<String> result = new ArrayList<>();
if (csvLine == null || csvLine.isEmpty()) {
return result;
}
if (customQuote == ' ') {
customQuote = DEFAULT_QUOTE;
}
if (separators == ' ') {
separators = DEFAULT_SEPARATOR;
}
StringBuilder currVal = new StringBuilder();
boolean inQuotes = false;
boolean startCollectChar = false;
boolean dbleQuotesInCol = false;
char[] chars = csvLine.toCharArray();
for (char ch : chars) {
if (inQuotes) {
startCollectChar = true;
if (ch == customQuote) {
inQuotes = false;
dbleQuotesInCol = false;
} else {
if (ch == '\"') {
if (!dbleQuotesInCol) {
currVal.append(ch);
dbleQuotesInCol = true;
}
} else {
currVal.append(ch);
}
}
} else {
if (ch == customQuote) {
inQuotes = true;
if (chars[0] != '"' && customQuote == '\"') {
currVal.append('"');
}
if (startCollectChar) {
currVal.append('"');
}
} else if (ch == separators) {
result.add(currVal.toString());
currVal = new StringBuilder();
startCollectChar = false;
} else if (ch == '\r') {
continue;
} else if (ch == '\n') {
break;
} else {
currVal.append(ch);
}
}
}
result.add(currVal.toString());
return result;
}
}

View File

@ -0,0 +1,117 @@
package hirs.swid.utils;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
/**
* This class is a helper for creating hash values for the files associated
* with the swidtag program
*/
public class HashSwid {
public static final String ENCODING = "UTF-8";
public static final String SHA256 = "SHA-256";
public static final String SHA384 = "SHA-384";
public static final String SHA512 = "SHA-512";
/**
* Getter method for the hash that uses 256 bit hash
* @param value
* @return
*/
public static String get256Hash(String value) {
return getHashValue(value, SHA256);
}
/**
* Getter method for the hash that uses 384 bit hash
* @param value
* @return
*/
public String get384Hash(String value) {
return getHashValue(value, SHA384);
}
/**
* Getter method for the hash that uses 512 bit hash
* @param value
* @return
*/
public String get512Hash(String value) {
return getHashValue(value, SHA512);
}
/**
* This method creates the hash based on the provided algorithm and salt
* only accessible through helper methods.
*
* @param value string object to hash
* @param salt random value to make the hash stronger
* @param sha the algorithm to use for the hash
* @return
*/
private static String getHashValue(String value, String sha) {
String resultString = null;
try {
MessageDigest md = MessageDigest.getInstance(sha);
byte[] bytes = md.digest(value.getBytes(ENCODING));
StringBuilder sb = new StringBuilder();
for (int i = 0; i < bytes.length; i++) {
sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));
}
resultString = sb.toString();
} catch (UnsupportedEncodingException | NoSuchAlgorithmException grex) {
System.out.println(grex.getMessage());
}
return resultString;
}
/**
* This method is a public access hash function that operates on a string
* value and uses default assumptions on the salt and algorithm
* @param value string object to hash
* @return
*/
public static String getHashValue(String value) {
byte[] buffer = new byte[8192];
int count;
byte[] hash = null;
BufferedInputStream bis = null;
try {
MessageDigest md = MessageDigest.getInstance(SHA256);
bis = new BufferedInputStream(new FileInputStream(value));
while ((count = bis.read(buffer)) > 0) {
md.update(buffer, 0, count);
}
hash = md.digest();
} catch (UnsupportedEncodingException | NoSuchAlgorithmException grex) {
System.out.println(grex.getMessage());
} catch (IOException ioEx) {
System.out.println(String.format("%s: \n%s is not valid...",
ioEx.getMessage(), value));
} finally {
try {
if (bis != null) {
bis.close();
}
} catch (IOException ioEx) {
// ignored, system issue that won't affect further execution
}
if (hash == null) {
return "";
}
}
return Base64.getEncoder().encodeToString(hash);
}
}

View File

@ -0,0 +1,97 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
/**
*
* Attributes common to all Elements in this schema
*
*
* <p>
* Java class for BaseElement complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="BaseElement"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/&gt;
* &lt;anyAttribute processContents='lax' namespace='##other'/&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BaseElement", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
@XmlSeeAlso({ SoftwareIdentity.class, Entity.class, Link.class, Meta.class,
ResourceCollection.class })
public class BaseElement {
@XmlAttribute(name = "lang", namespace = "http://www.w3.org/XML/1998/namespace")
protected String lang;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
*
* Allow xml:lang attribute on any element.
*
*
* @return possible object is {@link String }
*
*/
public String getLang() {
return lang;
}
/**
* Sets the value of the lang property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setLang(String value) {
this.lang = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed
* property on this class.
*
* <p>
* the map is keyed by the name of the attribute and the value is the string
* value of the attribute.
*
* the map returned by this method is live, and you can add new attribute by
* updating the map directly. Because of this design, there's no setter.
*
*
* @return always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@ -0,0 +1,105 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for CanonicalizationMethodType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*</p>
* <pre>
* &lt;complexType name="CanonicalizationMethodType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;any maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CanonicalizationMethodType", propOrder = { "content" })
public class CanonicalizationMethodType {
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
@XmlAttribute(name = "Algorithm", required = true)
@XmlSchemaType(name = "anyURI")
protected String algorithm;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Object }
* {@link String }
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
/**
* Gets the value of the algorithm property.
*
* @return possible object is {@link String }
*
*/
public String getAlgorithm() {
return algorithm;
}
/**
* Sets the value of the algorithm property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setAlgorithm(String value) {
this.algorithm = value;
}
}

View File

@ -0,0 +1,200 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for DSAKeyValueType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="DSAKeyValueType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;sequence minOccurs="0"&gt;
* &lt;element name="P" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/&gt;
* &lt;element name="Q" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/&gt;
* &lt;/sequence&gt;
* &lt;element name="G" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/&gt;
* &lt;element name="Y" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/&gt;
* &lt;element name="J" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/&gt;
* &lt;sequence minOccurs="0"&gt;
* &lt;element name="Seed" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/&gt;
* &lt;element name="PgenCounter" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/&gt;
* &lt;/sequence&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DSAKeyValueType", propOrder = { "p", "q", "g", "y", "j",
"seed", "pgenCounter" })
public class DSAKeyValueType {
@XmlElement(name = "P")
protected byte[] p;
@XmlElement(name = "Q")
protected byte[] q;
@XmlElement(name = "G")
protected byte[] g;
@XmlElement(name = "Y", required = true)
protected byte[] y;
@XmlElement(name = "J")
protected byte[] j;
@XmlElement(name = "Seed")
protected byte[] seed;
@XmlElement(name = "PgenCounter")
protected byte[] pgenCounter;
/**
* Gets the value of the p property.
*
* @return possible object is byte[]
*/
public byte[] getP() {
return p;
}
/**
* Sets the value of the p property.
*
* @param value
* allowed object is byte[]
*/
public void setP(byte[] value) {
this.p = value;
}
/**
* Gets the value of the q property.
*
* @return possible object is byte[]
*/
public byte[] getQ() {
return q;
}
/**
* Sets the value of the q property.
*
* @param value
* allowed object is byte[]
*/
public void setQ(byte[] value) {
this.q = value;
}
/**
* Gets the value of the g property.
*
* @return possible object is byte[]
*/
public byte[] getG() {
return g;
}
/**
* Sets the value of the g property.
*
* @param value
* allowed object is byte[]
*/
public void setG(byte[] value) {
this.g = value;
}
/**
* Gets the value of the y property.
*
* @return possible object is byte[]
*/
public byte[] getY() {
return y;
}
/**
* Sets the value of the y property.
*
* @param value
* allowed object is byte[]
*/
public void setY(byte[] value) {
this.y = value;
}
/**
* Gets the value of the j property.
*
* @return possible object is byte[]
*/
public byte[] getJ() {
return j;
}
/**
* Sets the value of the j property.
*
* @param value
* allowed object is byte[]
*/
public void setJ(byte[] value) {
this.j = value;
}
/**
* Gets the value of the seed property.
*
* @return possible object is byte[]
*/
public byte[] getSeed() {
return seed;
}
/**
* Sets the value of the seed property.
*
* @param value
* allowed object is byte[]
*/
public void setSeed(byte[] value) {
this.seed = value;
}
/**
* Gets the value of the pgenCounter property.
*
* @return possible object is byte[]
*/
public byte[] getPgenCounter() {
return pgenCounter;
}
/**
* Sets the value of the pgenCounter property.
*
* @param value
* allowed object is byte[]
*/
public void setPgenCounter(byte[] value) {
this.pgenCounter = value;
}
}

View File

@ -0,0 +1,106 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>
* Java class for DigestMethodType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="DigestMethodType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DigestMethodType", propOrder = { "content" })
public class DigestMethodType {
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
@XmlAttribute(name = "Algorithm", required = true)
@XmlSchemaType(name = "anyURI")
protected String algorithm;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Element }
* {@link Object } {@link String }
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
/**
* Gets the value of the algorithm property.
*
* @return possible object is {@link String }
*
*/
public String getAlgorithm() {
return algorithm;
}
/**
* Sets the value of the algorithm property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setAlgorithm(String value) {
this.algorithm = value;
}
}

View File

@ -0,0 +1,80 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for Directory complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="Directory"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}FilesystemItem"&gt;
* &lt;choice maxOccurs="unbounded" minOccurs="0"&gt;
* &lt;element name="Directory" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Directory"/&gt;
* &lt;element name="File" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}File"/&gt;
* &lt;/choice&gt;
* &lt;anyAttribute processContents='lax'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Directory", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", propOrder = { "directoryOrFile" })
public class Directory extends FilesystemItem {
@XmlElements({ @XmlElement(name = "Directory", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = Directory.class, required = false),
@XmlElement(name = "File", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = File.class, required = false) })
protected List<FilesystemItem> directoryOrFile;
/**
* Gets the value of the directoryOrFile property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the directoryOrFile property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getDirectoryOrFile().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Directory } {@link File }
*
*
*/
public List<FilesystemItem> getDirectoryOrFile() {
if (directoryOrFile == null) {
directoryOrFile = new ArrayList<FilesystemItem>();
}
return this.directoryOrFile;
}
}

View File

@ -0,0 +1,188 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
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 javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for Entity complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="Entity"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}BaseElement"&gt;
* &lt;sequence maxOccurs="unbounded" minOccurs="0"&gt;
* &lt;element name="Meta" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Meta"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="regid" type="{http://www.w3.org/2001/XMLSchema}anyURI" default="http://invalid.unavailable" /&gt;
* &lt;attribute name="role" use="required" type="{http://www.w3.org/2001/XMLSchema}NMTOKENS" /&gt;
* &lt;attribute name="thumbprint" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;anyAttribute processContents='lax' namespace='##other'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Entity", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", propOrder = { "meta" })
public class Entity extends BaseElement {
@XmlElement(name = "Meta")
protected List<Meta> meta;
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "regid")
@XmlSchemaType(name = "anyURI")
protected String regid;
@XmlAttribute(name = "role", required = true)
@XmlSchemaType(name = "NMTOKENS")
protected List<String> role;
@XmlAttribute(name = "thumbprint")
protected String thumbprint;
/**
* Gets the value of the meta property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the meta property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getMeta().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Meta }
*
*
*/
public List<Meta> getMeta() {
if (meta == null) {
meta = new ArrayList<Meta>();
}
return this.meta;
}
/**
* Gets the value of the name property.
*
* @return possible object is {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the regid property.
*
* @return possible object is {@link String }
*
*/
public String getRegid() {
if (regid == null) {
return "http://invalid.unavailable";
} else {
return regid;
}
}
/**
* Sets the value of the regid property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setRegid(String value) {
this.regid = value;
}
/**
* Gets the value of the role property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the role property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getRole().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link String }
*
*
*/
public List<String> getRole() {
if (role == null) {
role = new ArrayList<String>();
}
return this.role;
}
/**
* Gets the value of the thumbprint property.
*
* @return possible object is {@link String }
*
*/
public String getThumbprint() {
return thumbprint;
}
/**
* Sets the value of the thumbprint property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setThumbprint(String value) {
this.thumbprint = value;
}
}

View File

@ -0,0 +1,91 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlAccessType;
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 javax.xml.datatype.XMLGregorianCalendar;
/**
* <p>
* Java class for Evidence complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="Evidence"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}ResourceCollection"&gt;
* &lt;attribute name="date" type="{http://www.w3.org/2001/XMLSchema}dateTime" /&gt;
* &lt;attribute name="deviceId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;anyAttribute processContents='lax' namespace='##other'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Evidence", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
public class Evidence extends ResourceCollection {
@XmlAttribute(name = "date")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar date;
@XmlAttribute(name = "deviceId")
protected String deviceId;
/**
* Gets the value of the date property.
*
* @return possible object is {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getDate() {
return date;
}
/**
* Sets the value of the date property.
*
* @param value
* allowed object is {@link XMLGregorianCalendar }
*
*/
public void setDate(XMLGregorianCalendar value) {
this.date = value;
}
/**
* Gets the value of the deviceId property.
*
* @return possible object is {@link String }
*
*/
public String getDeviceId() {
return deviceId;
}
/**
* Sets the value of the deviceId property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setDeviceId(String value) {
this.deviceId = value;
}
}

View File

@ -0,0 +1,89 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for File complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="File"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}FilesystemItem"&gt;
* &lt;attribute name="size" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
* &lt;attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;anyAttribute processContents='lax'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "File", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
public class File extends FilesystemItem {
@XmlAttribute(name = "size")
protected BigInteger size;
@XmlAttribute(name = "version")
protected String version;
/**
* Gets the value of the size property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getSize() {
return size;
}
/**
* Sets the value of the size property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setSize(BigInteger value) {
this.size = value;
}
/**
* Gets the value of the version property.
*
* @return possible object is {@link String }
*
*/
public String getVersion() {
return version;
}
/**
* Sets the value of the version property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setVersion(String value) {
this.version = value;
}
}

View File

@ -0,0 +1,138 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for FilesystemItem complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="FilesystemItem"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Meta"&gt;
* &lt;attribute name="key" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
* &lt;attribute name="location" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="root" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;anyAttribute processContents='lax'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FilesystemItem", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
@XmlSeeAlso({ File.class, Directory.class })
public class FilesystemItem extends Meta {
@XmlAttribute(name = "key")
protected Boolean key;
@XmlAttribute(name = "location")
protected String location;
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "root")
protected String root;
/**
* Gets the value of the key property.
*
* @return possible object is {@link Boolean }
*
*/
public Boolean isKey() {
return key;
}
/**
* Sets the value of the key property.
*
* @param value
* allowed object is {@link Boolean }
*
*/
public void setKey(Boolean value) {
this.key = value;
}
/**
* Gets the value of the location property.
*
* @return possible object is {@link String }
*
*/
public String getLocation() {
return location;
}
/**
* Sets the value of the location property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setLocation(String value) {
this.location = value;
}
/**
* Gets the value of the name property.
*
* @return possible object is {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the root property.
*
* @return possible object is {@link String }
*
*/
public String getRoot() {
return root;
}
/**
* Sets the value of the root property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setRoot(String value) {
this.root = value;
}
}

View File

@ -0,0 +1,135 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.w3c.dom.Element;
/**
* <p>
* Java class for KeyInfoType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="KeyInfoType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;choice maxOccurs="unbounded"&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}KeyName"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}KeyValue"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}RetrievalMethod"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}X509Data"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}PGPData"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SPKIData"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}MgmtData"/&gt;
* &lt;any processContents='lax' namespace='##other'/&gt;
* &lt;/choice&gt;
* &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "KeyInfoType", propOrder = { "content" })
public class KeyInfoType {
@XmlElementRefs({
@XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "RetrievalMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "PGPData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "MgmtData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) })
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link String }
* {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >} {@link Element }
* {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >}
* {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} {@link Object }
* {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement }
* {@code <}{@link X509DataType }{@code >} {@link JAXBElement }{@code <}
* {@link PGPDataType }{@code >} {@link JAXBElement }{@code <}{@link String }
* {@code >}
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}

View File

@ -0,0 +1,89 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>
* Java class for KeyValueType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="KeyValueType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;choice&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DSAKeyValue"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}RSAKeyValue"/&gt;
* &lt;any processContents='lax' namespace='##other'/&gt;
* &lt;/choice&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "KeyValueType", propOrder = { "content" })
public class KeyValueType {
@XmlElementRefs({
@XmlElementRef(name = "RSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "DSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) })
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Object }
* {@link String } {@link JAXBElement }{@code <}{@link RSAKeyValueType }
* {@code >} {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >}
* {@link Element }
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
}

View File

@ -0,0 +1,214 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlAccessType;
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 javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>
* Java class for Link complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="Link"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}BaseElement"&gt;
* &lt;attribute name="artifact" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="href" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;attribute name="media" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Media" /&gt;
* &lt;attribute name="ownership" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Ownership" /&gt;
* &lt;attribute name="rel" use="required" type="{http://www.w3.org/2001/XMLSchema}NMTOKEN" /&gt;
* &lt;attribute name="type" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}MediaType" /&gt;
* &lt;attribute name="use" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Use" /&gt;
* &lt;anyAttribute processContents='lax' namespace='##other'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Link", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
public class Link extends BaseElement {
@XmlAttribute(name = "artifact")
protected String artifact;
@XmlAttribute(name = "href", required = true)
@XmlSchemaType(name = "anyURI")
protected String href;
@XmlAttribute(name = "media")
protected String media;
@XmlAttribute(name = "ownership")
protected Ownership ownership;
@XmlAttribute(name = "rel", required = true)
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NMTOKEN")
protected String rel;
@XmlAttribute(name = "type")
protected String type;
@XmlAttribute(name = "use")
protected Use use;
/**
* Gets the value of the artifact property.
*
* @return possible object is {@link String }
*
*/
public String getArtifact() {
return artifact;
}
/**
* Sets the value of the artifact property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setArtifact(String value) {
this.artifact = value;
}
/**
* Gets the value of the href property.
*
* @return possible object is {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
/**
* Gets the value of the media property.
*
* @return possible object is {@link String }
*
*/
public String getMedia() {
return media;
}
/**
* Sets the value of the media property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setMedia(String value) {
this.media = value;
}
/**
* Gets the value of the ownership property.
*
* @return possible object is {@link Ownership }
*
*/
public Ownership getOwnership() {
return ownership;
}
/**
* Sets the value of the ownership property.
*
* @param value
* allowed object is {@link Ownership }
*
*/
public void setOwnership(Ownership value) {
this.ownership = value;
}
/**
* Gets the value of the rel property.
*
* @return possible object is {@link String }
*
*/
public String getRel() {
return rel;
}
/**
* Sets the value of the rel property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setRel(String value) {
this.rel = value;
}
/**
* Gets the value of the type property.
*
* @return possible object is {@link String }
*
*/
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
/**
* Gets the value of the use property.
*
* @return possible object is {@link Use }
*
*/
public Use getUse() {
return use;
}
/**
* Sets the value of the use property.
*
* @param value
* allowed object is {@link Use }
*
*/
public void setUse(Use value) {
this.use = value;
}
}

View File

@ -0,0 +1,108 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
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 javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>
* Java class for ManifestType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="ManifestType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ManifestType", propOrder = { "reference" })
public class ManifestType {
@XmlElement(name = "Reference", required = true)
protected List<ReferenceType> reference;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the reference property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the reference property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getReference().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ReferenceType }
*
*
*/
public List<ReferenceType> getReference() {
if (reference == null) {
reference = new ArrayList<ReferenceType>();
}
return this.reference;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}

View File

@ -0,0 +1,41 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for Meta complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="Meta"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}BaseElement"&gt;
* &lt;anyAttribute processContents='lax'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Meta", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
@XmlSeeAlso({ SoftwareMeta.class, Resource.class, Process.class,
FilesystemItem.class })
public class Meta extends BaseElement {
}

View File

@ -0,0 +1,844 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.math.BigInteger;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each Java content interface and Java
* element interface generated in the hirs.swid.xjc package.
* <p>
* An ObjectFactory allows you to programatically construct new instances of the
* Java representation for XML content. The Java representation of XML content
* can consist of schema derived interfaces and classes representing the binding
* of schema type definitions, element declarations and model groups. Factory
* methods for each of these are provided in this class.
* </p>
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _SPKIData_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SPKIData");
private final static QName _KeyInfo_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "KeyInfo");
private final static QName _SignatureValue_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SignatureValue");
private final static QName _KeyValue_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "KeyValue");
private final static QName _Transforms_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "Transforms");
private final static QName _DigestMethod_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "DigestMethod");
private final static QName _X509Data_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "X509Data");
private final static QName _SignatureProperty_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SignatureProperty");
private final static QName _KeyName_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "KeyName");
private final static QName _RSAKeyValue_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "RSAKeyValue");
private final static QName _SoftwareIdentity_QNAME = new QName(
"http://standards.iso.org/iso/19770/-2/2015/schema.xsd",
"SoftwareIdentity");
private final static QName _Signature_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "Signature");
private final static QName _MgmtData_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "MgmtData");
private final static QName _SignatureMethod_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SignatureMethod");
private final static QName _Object_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "Object");
private final static QName _SignatureProperties_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SignatureProperties");
private final static QName _Transform_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "Transform");
private final static QName _PGPData_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "PGPData");
private final static QName _Reference_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "Reference");
private final static QName _RetrievalMethod_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "RetrievalMethod");
private final static QName _DSAKeyValue_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "DSAKeyValue");
private final static QName _DigestValue_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "DigestValue");
private final static QName _CanonicalizationMethod_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "CanonicalizationMethod");
private final static QName _SignedInfo_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SignedInfo");
private final static QName _Manifest_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "Manifest");
private final static QName _PGPDataTypePGPKeyID_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "PGPKeyID");
private final static QName _PGPDataTypePGPKeyPacket_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "PGPKeyPacket");
private final static QName _SignatureMethodTypeHMACOutputLength_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "HMACOutputLength");
private final static QName _X509DataTypeX509IssuerSerial_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "X509IssuerSerial");
private final static QName _X509DataTypeX509CRL_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "X509CRL");
private final static QName _X509DataTypeX509SubjectName_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "X509SubjectName");
private final static QName _X509DataTypeX509SKI_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "X509SKI");
private final static QName _X509DataTypeX509Certificate_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "X509Certificate");
private final static QName _SoftwareIdentityLink_QNAME = new QName(
"http://standards.iso.org/iso/19770/-2/2015/schema.xsd", "Link");
private final static QName _SoftwareIdentityEvidence_QNAME = new QName(
"http://standards.iso.org/iso/19770/-2/2015/schema.xsd", "Evidence");
private final static QName _SoftwareIdentityPayload_QNAME = new QName(
"http://standards.iso.org/iso/19770/-2/2015/schema.xsd", "Payload");
private final static QName _SoftwareIdentityEntity_QNAME = new QName(
"http://standards.iso.org/iso/19770/-2/2015/schema.xsd", "Entity");
private final static QName _SoftwareIdentityMeta_QNAME = new QName(
"http://standards.iso.org/iso/19770/-2/2015/schema.xsd", "Meta");
private final static QName _TransformTypeXPath_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "XPath");
private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName(
"http://www.w3.org/2000/09/xmldsig#", "SPKISexp");
/**
* Create a new ObjectFactory that can be used to create new instances of
* schema derived classes for package: hirs.swid.xjc
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link SoftwareIdentity }
*
*/
public SoftwareIdentity createSoftwareIdentity() {
return new SoftwareIdentity();
}
/**
* Create an instance of {@link SoftwareMeta }
*
*/
public SoftwareMeta createSoftwareMeta() {
return new SoftwareMeta();
}
/**
* Create an instance of {@link Entity }
*
*/
public Entity createEntity() {
return new Entity();
}
/**
* Create an instance of {@link Meta }
*
*/
public Meta createMeta() {
return new Meta();
}
/**
* Create an instance of {@link FilesystemItem }
*
*/
public FilesystemItem createFilesystemItem() {
return new FilesystemItem();
}
/**
* Create an instance of {@link Resource }
*
*/
public Resource createResource() {
return new Resource();
}
/**
* Create an instance of {@link Process }
*
*/
public Process createProcess() {
return new Process();
}
/**
* Create an instance of {@link BaseElement }
*
*/
public BaseElement createBaseElement() {
return new BaseElement();
}
/**
* Create an instance of {@link Evidence }
*
*/
public Evidence createEvidence() {
return new Evidence();
}
/**
* Create an instance of {@link File }
*
*/
public File createFile() {
return new File();
}
/**
* Create an instance of {@link Link }
*
*/
public Link createLink() {
return new Link();
}
/**
* Create an instance of {@link Directory }
*
*/
public Directory createDirectory() {
return new Directory();
}
/**
* Create an instance of {@link ResourceCollection }
*
*/
public ResourceCollection createResourceCollection() {
return new ResourceCollection();
}
/**
* Create an instance of {@link PGPDataType }
*
*/
public PGPDataType createPGPDataType() {
return new PGPDataType();
}
/**
* Create an instance of {@link KeyValueType }
*
*/
public KeyValueType createKeyValueType() {
return new KeyValueType();
}
/**
* Create an instance of {@link DSAKeyValueType }
*
*/
public DSAKeyValueType createDSAKeyValueType() {
return new DSAKeyValueType();
}
/**
* Create an instance of {@link ReferenceType }
*
*/
public ReferenceType createReferenceType() {
return new ReferenceType();
}
/**
* Create an instance of {@link RetrievalMethodType }
*
*/
public RetrievalMethodType createRetrievalMethodType() {
return new RetrievalMethodType();
}
/**
* Create an instance of {@link TransformsType }
*
*/
public TransformsType createTransformsType() {
return new TransformsType();
}
/**
* Create an instance of {@link CanonicalizationMethodType }
*
*/
public CanonicalizationMethodType createCanonicalizationMethodType() {
return new CanonicalizationMethodType();
}
/**
* Create an instance of {@link DigestMethodType }
*
*/
public DigestMethodType createDigestMethodType() {
return new DigestMethodType();
}
/**
* Create an instance of {@link ManifestType }
*
*/
public ManifestType createManifestType() {
return new ManifestType();
}
/**
* Create an instance of {@link SignaturePropertyType }
*
*/
public SignaturePropertyType createSignaturePropertyType() {
return new SignaturePropertyType();
}
/**
* Create an instance of {@link X509DataType }
*
*/
public X509DataType createX509DataType() {
return new X509DataType();
}
/**
* Create an instance of {@link SignedInfoType }
*
*/
public SignedInfoType createSignedInfoType() {
return new SignedInfoType();
}
/**
* Create an instance of {@link RSAKeyValueType }
*
*/
public RSAKeyValueType createRSAKeyValueType() {
return new RSAKeyValueType();
}
/**
* Create an instance of {@link SPKIDataType }
*
*/
public SPKIDataType createSPKIDataType() {
return new SPKIDataType();
}
/**
* Create an instance of {@link SignatureValueType }
*
*/
public SignatureValueType createSignatureValueType() {
return new SignatureValueType();
}
/**
* Create an instance of {@link KeyInfoType }
*
*/
public KeyInfoType createKeyInfoType() {
return new KeyInfoType();
}
/**
* Create an instance of {@link SignatureType }
*
*/
public SignatureType createSignatureType() {
return new SignatureType();
}
/**
* Create an instance of {@link SignaturePropertiesType }
*
*/
public SignaturePropertiesType createSignaturePropertiesType() {
return new SignaturePropertiesType();
}
/**
* Create an instance of {@link SignatureMethodType }
*
*/
public SignatureMethodType createSignatureMethodType() {
return new SignatureMethodType();
}
/**
* Create an instance of {@link ObjectType }
*
*/
public ObjectType createObjectType() {
return new ObjectType();
}
/**
* Create an instance of {@link TransformType }
*
*/
public TransformType createTransformType() {
return new TransformType();
}
/**
* Create an instance of {@link X509IssuerSerialType }
*
*/
public X509IssuerSerialType createX509IssuerSerialType() {
return new X509IssuerSerialType();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SPKIDataType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKIData")
public JAXBElement<SPKIDataType> createSPKIData(SPKIDataType value) {
return new JAXBElement<SPKIDataType>(_SPKIData_QNAME,
SPKIDataType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link KeyInfoType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyInfo")
public JAXBElement<KeyInfoType> createKeyInfo(KeyInfoType value) {
return new JAXBElement<KeyInfoType>(_KeyInfo_QNAME, KeyInfoType.class,
null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link SignatureValueType }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureValue")
public JAXBElement<SignatureValueType> createSignatureValue(
SignatureValueType value) {
return new JAXBElement<SignatureValueType>(_SignatureValue_QNAME,
SignatureValueType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link KeyValueType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyValue")
public JAXBElement<KeyValueType> createKeyValue(KeyValueType value) {
return new JAXBElement<KeyValueType>(_KeyValue_QNAME,
KeyValueType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link TransformsType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transforms")
public JAXBElement<TransformsType> createTransforms(TransformsType value) {
return new JAXBElement<TransformsType>(_Transforms_QNAME,
TransformsType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link DigestMethodType }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestMethod")
public JAXBElement<DigestMethodType> createDigestMethod(
DigestMethodType value) {
return new JAXBElement<DigestMethodType>(_DigestMethod_QNAME,
DigestMethodType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link X509DataType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Data")
public JAXBElement<X509DataType> createX509Data(X509DataType value) {
return new JAXBElement<X509DataType>(_X509Data_QNAME,
X509DataType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link SignaturePropertyType }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperty")
public JAXBElement<SignaturePropertyType> createSignatureProperty(
SignaturePropertyType value) {
return new JAXBElement<SignaturePropertyType>(_SignatureProperty_QNAME,
SignaturePropertyType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyName")
public JAXBElement<String> createKeyName(String value) {
return new JAXBElement<String>(_KeyName_QNAME, String.class, null,
value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link RSAKeyValueType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RSAKeyValue")
public JAXBElement<RSAKeyValueType> createRSAKeyValue(RSAKeyValueType value) {
return new JAXBElement<RSAKeyValueType>(_RSAKeyValue_QNAME,
RSAKeyValueType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link SoftwareIdentity }{@code >}
*
*/
@XmlElementDecl(namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", name = "SoftwareIdentity")
public JAXBElement<SoftwareIdentity> createSoftwareIdentity(
SoftwareIdentity value) {
return new JAXBElement<SoftwareIdentity>(_SoftwareIdentity_QNAME,
SoftwareIdentity.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SignatureType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Signature")
public JAXBElement<SignatureType> createSignature(SignatureType value) {
return new JAXBElement<SignatureType>(_Signature_QNAME,
SignatureType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "MgmtData")
public JAXBElement<String> createMgmtData(String value) {
return new JAXBElement<String>(_MgmtData_QNAME, String.class, null,
value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link SignatureMethodType }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureMethod")
public JAXBElement<SignatureMethodType> createSignatureMethod(
SignatureMethodType value) {
return new JAXBElement<SignatureMethodType>(_SignatureMethod_QNAME,
SignatureMethodType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ObjectType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Object")
public JAXBElement<ObjectType> createObject(ObjectType value) {
return new JAXBElement<ObjectType>(_Object_QNAME, ObjectType.class,
null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link SignaturePropertiesType }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperties")
public JAXBElement<SignaturePropertiesType> createSignatureProperties(
SignaturePropertiesType value) {
return new JAXBElement<SignaturePropertiesType>(
_SignatureProperties_QNAME, SignaturePropertiesType.class,
null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link TransformType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transform")
public JAXBElement<TransformType> createTransform(TransformType value) {
return new JAXBElement<TransformType>(_Transform_QNAME,
TransformType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link PGPDataType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPData")
public JAXBElement<PGPDataType> createPGPData(PGPDataType value) {
return new JAXBElement<PGPDataType>(_PGPData_QNAME, PGPDataType.class,
null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ReferenceType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Reference")
public JAXBElement<ReferenceType> createReference(ReferenceType value) {
return new JAXBElement<ReferenceType>(_Reference_QNAME,
ReferenceType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link RetrievalMethodType }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RetrievalMethod")
public JAXBElement<RetrievalMethodType> createRetrievalMethod(
RetrievalMethodType value) {
return new JAXBElement<RetrievalMethodType>(_RetrievalMethod_QNAME,
RetrievalMethodType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link DSAKeyValueType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DSAKeyValue")
public JAXBElement<DSAKeyValueType> createDSAKeyValue(DSAKeyValueType value) {
return new JAXBElement<DSAKeyValueType>(_DSAKeyValue_QNAME,
DSAKeyValueType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestValue")
public JAXBElement<byte[]> createDigestValue(byte[] value) {
return new JAXBElement<byte[]>(_DigestValue_QNAME, byte[].class, null,
((byte[]) value));
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link CanonicalizationMethodType }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "CanonicalizationMethod")
public JAXBElement<CanonicalizationMethodType> createCanonicalizationMethod(
CanonicalizationMethodType value) {
return new JAXBElement<CanonicalizationMethodType>(
_CanonicalizationMethod_QNAME,
CanonicalizationMethodType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SignedInfoType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignedInfo")
public JAXBElement<SignedInfoType> createSignedInfo(SignedInfoType value) {
return new JAXBElement<SignedInfoType>(_SignedInfo_QNAME,
SignedInfoType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ManifestType }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Manifest")
public JAXBElement<ManifestType> createManifest(ManifestType value) {
return new JAXBElement<ManifestType>(_Manifest_QNAME,
ManifestType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyID", scope = PGPDataType.class)
public JAXBElement<byte[]> createPGPDataTypePGPKeyID(byte[] value) {
return new JAXBElement<byte[]>(_PGPDataTypePGPKeyID_QNAME,
byte[].class, PGPDataType.class, ((byte[]) value));
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyPacket", scope = PGPDataType.class)
public JAXBElement<byte[]> createPGPDataTypePGPKeyPacket(byte[] value) {
return new JAXBElement<byte[]>(_PGPDataTypePGPKeyPacket_QNAME,
byte[].class, PGPDataType.class, ((byte[]) value));
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "HMACOutputLength", scope = SignatureMethodType.class)
public JAXBElement<BigInteger> createSignatureMethodTypeHMACOutputLength(
BigInteger value) {
return new JAXBElement<BigInteger>(
_SignatureMethodTypeHMACOutputLength_QNAME, BigInteger.class,
SignatureMethodType.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link X509IssuerSerialType }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509IssuerSerial", scope = X509DataType.class)
public JAXBElement<X509IssuerSerialType> createX509DataTypeX509IssuerSerial(
X509IssuerSerialType value) {
return new JAXBElement<X509IssuerSerialType>(
_X509DataTypeX509IssuerSerial_QNAME,
X509IssuerSerialType.class, X509DataType.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509CRL", scope = X509DataType.class)
public JAXBElement<byte[]> createX509DataTypeX509CRL(byte[] value) {
return new JAXBElement<byte[]>(_X509DataTypeX509CRL_QNAME,
byte[].class, X509DataType.class, ((byte[]) value));
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SubjectName", scope = X509DataType.class)
public JAXBElement<String> createX509DataTypeX509SubjectName(String value) {
return new JAXBElement<String>(_X509DataTypeX509SubjectName_QNAME,
String.class, X509DataType.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SKI", scope = X509DataType.class)
public JAXBElement<byte[]> createX509DataTypeX509SKI(byte[] value) {
return new JAXBElement<byte[]>(_X509DataTypeX509SKI_QNAME,
byte[].class, X509DataType.class, ((byte[]) value));
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Certificate", scope = X509DataType.class)
public JAXBElement<byte[]> createX509DataTypeX509Certificate(byte[] value) {
return new JAXBElement<byte[]>(_X509DataTypeX509Certificate_QNAME,
byte[].class, X509DataType.class, ((byte[]) value));
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Link }{@code >}
*
*/
@XmlElementDecl(namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", name = "Link", scope = SoftwareIdentity.class)
public JAXBElement<Link> createSoftwareIdentityLink(Link value) {
return new JAXBElement<Link>(_SoftwareIdentityLink_QNAME, Link.class,
SoftwareIdentity.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Evidence }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", name = "Evidence", scope = SoftwareIdentity.class)
public JAXBElement<Evidence> createSoftwareIdentityEvidence(Evidence value) {
return new JAXBElement<Evidence>(_SoftwareIdentityEvidence_QNAME,
Evidence.class, SoftwareIdentity.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}
* {@link ResourceCollection }{@code >}
*
*/
@XmlElementDecl(namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", name = "Payload", scope = SoftwareIdentity.class)
public JAXBElement<ResourceCollection> createSoftwareIdentityPayload(
ResourceCollection value) {
return new JAXBElement<ResourceCollection>(
_SoftwareIdentityPayload_QNAME, ResourceCollection.class,
SoftwareIdentity.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Entity }{@code >}
*
*/
@XmlElementDecl(namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", name = "Entity", scope = SoftwareIdentity.class)
public JAXBElement<Entity> createSoftwareIdentityEntity(Entity value) {
return new JAXBElement<Entity>(_SoftwareIdentityEntity_QNAME,
Entity.class, SoftwareIdentity.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SoftwareMeta }
* {@code >}
*
*/
@XmlElementDecl(namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", name = "Meta", scope = SoftwareIdentity.class)
public JAXBElement<SoftwareMeta> createSoftwareIdentityMeta(
SoftwareMeta value) {
return new JAXBElement<SoftwareMeta>(_SoftwareIdentityMeta_QNAME,
SoftwareMeta.class, SoftwareIdentity.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "XPath", scope = TransformType.class)
public JAXBElement<String> createTransformTypeXPath(String value) {
return new JAXBElement<String>(_TransformTypeXPath_QNAME, String.class,
TransformType.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*/
@XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKISexp", scope = SPKIDataType.class)
public JAXBElement<byte[]> createSPKIDataTypeSPKISexp(byte[] value) {
return new JAXBElement<byte[]>(_SPKIDataTypeSPKISexp_QNAME,
byte[].class, SPKIDataType.class, ((byte[]) value));
}
}

View File

@ -0,0 +1,160 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.w3c.dom.Element;
/**
* <p>
* Java class for ObjectType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="ObjectType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence maxOccurs="unbounded" minOccurs="0"&gt;
* &lt;any processContents='lax'/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
* &lt;attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="Encoding" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ObjectType", propOrder = { "content" })
public class ObjectType {
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
@XmlAttribute(name = "MimeType")
protected String mimeType;
@XmlAttribute(name = "Encoding")
@XmlSchemaType(name = "anyURI")
protected String encoding;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Element }
* {@link Object } {@link String }
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the mimeType property.
*
* @return possible object is {@link String }
*
*/
public String getMimeType() {
return mimeType;
}
/**
* Sets the value of the mimeType property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setMimeType(String value) {
this.mimeType = value;
}
/**
* Gets the value of the encoding property.
*
* @return possible object is {@link String }
*
*/
public String getEncoding() {
return encoding;
}
/**
* Sets the value of the encoding property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setEncoding(String value) {
this.encoding = value;
}
}

View File

@ -0,0 +1,85 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for Ownership.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
*
* <pre>
* &lt;simpleType name="Ownership"&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN"&gt;
* &lt;enumeration value="abandon"/&gt;
* &lt;enumeration value="private"/&gt;
* &lt;enumeration value="shared"/&gt;
* &lt;/restriction&gt;
* &lt;/simpleType&gt;
* </pre>
*
*/
@XmlType(name = "Ownership", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
@XmlEnum
public enum Ownership {
/**
*
* Determines the relative strength of ownership of the target piece of
* software.
*
*
*/
@XmlEnumValue("abandon")
ABANDON("abandon"),
/**
*
* If this is uninstalled, then the [Link]'d software should be removed too.
*
*
*/
@XmlEnumValue("private")
PRIVATE("private"),
/**
*
* If this is uninstalled, then the [Link]'d software should be removed if
* nobody else is sharing it
*
*
*/
@XmlEnumValue("shared")
SHARED("shared");
private final String value;
Ownership(String v) {
value = v;
}
public String value() {
return value;
}
public static Ownership fromValue(String v) {
for (Ownership c : Ownership.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}

View File

@ -0,0 +1,103 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>
* Java class for PGPDataType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="PGPDataType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;choice&gt;
* &lt;sequence&gt;
* &lt;element name="PGPKeyID" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/&gt;
* &lt;element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/&gt;
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;sequence&gt;
* &lt;element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/&gt;
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/choice&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PGPDataType", propOrder = { "content" })
public class PGPDataType {
@XmlElementRefs({
@XmlElementRef(name = "PGPKeyID", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "PGPKeyPacket", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) })
@XmlAnyElement(lax = true)
protected List<Object> content;
/**
* Gets the rest of the content model.
*
* <p>
* You are getting this "catch-all" property because of the following
* reason: The field name "PGPKeyPacket" is used by two different parts of a
* schema. See: line 218 of
* http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd line 213 of
* http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd
* <p>
* To get rid of this property, apply a property customization to one of
* both of the following declarations to change their names: Gets the value
* of the content property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link JAXBElement }{@code <}{@link byte[]}{@code >} {@link JAXBElement }
* {@code <}{@link byte[]}{@code >} {@link Object } {@link Element }
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
}

View File

@ -0,0 +1,89 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for Process complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="Process"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Meta"&gt;
* &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="pid" type="{http://www.w3.org/2001/XMLSchema}integer" /&gt;
* &lt;anyAttribute processContents='lax'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Process", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
public class Process extends Meta {
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "pid")
protected BigInteger pid;
/**
* Gets the value of the name property.
*
* @return possible object is {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the pid property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getPid() {
return pid;
}
/**
* Sets the value of the pid property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setPid(BigInteger value) {
this.pid = value;
}
}

View File

@ -0,0 +1,85 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for RSAKeyValueType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="RSAKeyValueType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="Modulus" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/&gt;
* &lt;element name="Exponent" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RSAKeyValueType", propOrder = { "modulus", "exponent" })
public class RSAKeyValueType {
@XmlElement(name = "Modulus", required = true)
protected byte[] modulus;
@XmlElement(name = "Exponent", required = true)
protected byte[] exponent;
/**
* Gets the value of the modulus property.
*
* @return possible object is byte[]
*/
public byte[] getModulus() {
return modulus;
}
/**
* Sets the value of the modulus property.
*
* @param value
* allowed object is byte[]
*/
public void setModulus(byte[] value) {
this.modulus = value;
}
/**
* Gets the value of the exponent property.
*
* @return possible object is byte[]
*/
public byte[] getExponent() {
return exponent;
}
/**
* Sets the value of the exponent property.
*
* @param value
* allowed object is byte[]
*/
public void setExponent(byte[] value) {
this.exponent = value;
}
}

View File

@ -0,0 +1,194 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
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 javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>
* Java class for ReferenceType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="ReferenceType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
* &lt;attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ReferenceType", propOrder = { "transforms", "digestMethod",
"digestValue" })
public class ReferenceType {
@XmlElement(name = "Transforms")
protected TransformsType transforms;
@XmlElement(name = "DigestMethod", required = true)
protected DigestMethodType digestMethod;
@XmlElement(name = "DigestValue", required = true)
protected byte[] digestValue;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
@XmlAttribute(name = "URI")
@XmlSchemaType(name = "anyURI")
protected String uri;
@XmlAttribute(name = "Type")
@XmlSchemaType(name = "anyURI")
protected String type;
/**
* Gets the value of the transforms property.
*
* @return possible object is {@link TransformsType }
*
*/
public TransformsType getTransforms() {
return transforms;
}
/**
* Sets the value of the transforms property.
*
* @param value
* allowed object is {@link TransformsType }
*
*/
public void setTransforms(TransformsType value) {
this.transforms = value;
}
/**
* Gets the value of the digestMethod property.
*
* @return possible object is {@link DigestMethodType }
*
*/
public DigestMethodType getDigestMethod() {
return digestMethod;
}
/**
* Sets the value of the digestMethod property.
*
* @param value
* allowed object is {@link DigestMethodType }
*
*/
public void setDigestMethod(DigestMethodType value) {
this.digestMethod = value;
}
/**
* Gets the value of the digestValue property.
*
* @return possible object is byte[]
*/
public byte[] getDigestValue() {
return digestValue;
}
/**
* Sets the value of the digestValue property.
*
* @param value
* allowed object is byte[]
*/
public void setDigestValue(byte[] value) {
this.digestValue = value;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the uri property.
*
* @return possible object is {@link String }
*
*/
public String getURI() {
return uri;
}
/**
* Sets the value of the uri property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setURI(String value) {
this.uri = value;
}
/**
* Gets the value of the type property.
*
* @return possible object is {@link String }
*
*/
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
}

View File

@ -0,0 +1,64 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for Resource complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="Resource"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Meta"&gt;
* &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;anyAttribute processContents='lax'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Resource", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
public class Resource extends Meta {
@XmlAttribute(name = "type", required = true)
protected String type;
/**
* Gets the value of the type property.
*
* @return possible object is {@link String }
*
*/
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
}

View File

@ -0,0 +1,86 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for ResourceCollection complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="ResourceCollection"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}BaseElement"&gt;
* &lt;choice maxOccurs="unbounded" minOccurs="0"&gt;
* &lt;element name="Directory" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Directory"/&gt;
* &lt;element name="File" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}File"/&gt;
* &lt;element name="Process" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Process"/&gt;
* &lt;element name="Resource" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Resource"/&gt;
* &lt;/choice&gt;
* &lt;anyAttribute processContents='lax' namespace='##other'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ResourceCollection", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", propOrder = { "directoryOrFileOrProcess" })
@XmlSeeAlso({ Evidence.class })
public class ResourceCollection extends BaseElement {
@XmlElements({ @XmlElement(name = "Directory", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = Directory.class, required = false),
@XmlElement(name = "File", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = File.class, required = false),
@XmlElement(name = "Process", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = Process.class, required = false),
@XmlElement(name = "Resource", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = Resource.class, required = false) })
protected List<Meta> directoryOrFileOrProcess;
/**
* Gets the value of the directoryOrFileOrProcess property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the directoryOrFileOrProcess property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getDirectoryOrFileOrProcess().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Directory } {@link File } {@link Process } {@link Resource }
*
*
*/
public List<Meta> getDirectoryOrFileOrProcess() {
if (directoryOrFileOrProcess == null) {
directoryOrFileOrProcess = new ArrayList<Meta>();
}
return this.directoryOrFileOrProcess;
}
}

View File

@ -0,0 +1,117 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
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 javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for RetrievalMethodType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="RetrievalMethodType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RetrievalMethodType", propOrder = { "transforms" })
public class RetrievalMethodType {
@XmlElement(name = "Transforms")
protected TransformsType transforms;
@XmlAttribute(name = "URI")
@XmlSchemaType(name = "anyURI")
protected String uri;
@XmlAttribute(name = "Type")
@XmlSchemaType(name = "anyURI")
protected String type;
/**
* Gets the value of the transforms property.
*
* @return possible object is {@link TransformsType }
*
*/
public TransformsType getTransforms() {
return transforms;
}
/**
* Sets the value of the transforms property.
*
* @param value
* allowed object is {@link TransformsType }
*
*/
public void setTransforms(TransformsType value) {
this.transforms = value;
}
/**
* Gets the value of the uri property.
*
* @return possible object is {@link String }
*
*/
public String getURI() {
return uri;
}
/**
* Sets the value of the uri property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setURI(String value) {
this.uri = value;
}
/**
* Gets the value of the type property.
*
* @return possible object is {@link String }
*
*/
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
}

View File

@ -0,0 +1,81 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>
* Java class for SPKIDataType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="SPKIDataType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence maxOccurs="unbounded"&gt;
* &lt;element name="SPKISexp" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/&gt;
* &lt;any processContents='lax' namespace='##other' minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SPKIDataType", propOrder = { "spkiSexpAndAny" })
public class SPKIDataType {
@XmlElementRef(name = "SPKISexp", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class)
@XmlAnyElement(lax = true)
protected List<Object> spkiSexpAndAny;
/**
* Gets the value of the spkiSexpAndAny property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the spkiSexpAndAny property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getSPKISexpAndAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Element }
* {@link Object } {@link JAXBElement }{@code <}{@link byte[]}{@code >}
*
*
*/
public List<Object> getSPKISexpAndAny() {
if (spkiSexpAndAny == null) {
spkiSexpAndAny = new ArrayList<Object>();
}
return this.spkiSexpAndAny;
}
}

View File

@ -0,0 +1,110 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for SignatureMethodType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="SignatureMethodType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="HMACOutputLength" type="{http://www.w3.org/2000/09/xmldsig#}HMACOutputLengthType" minOccurs="0"/&gt;
* &lt;any namespace='##other' maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SignatureMethodType", propOrder = { "content" })
public class SignatureMethodType {
@XmlElementRef(name = "HMACOutputLength", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false)
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
@XmlAttribute(name = "Algorithm", required = true)
@XmlSchemaType(name = "anyURI")
protected String algorithm;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Object }
* {@link String } {@link JAXBElement }{@code <}{@link BigInteger }{@code >}
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
/**
* Gets the value of the algorithm property.
*
* @return possible object is {@link String }
*
*/
public String getAlgorithm() {
return algorithm;
}
/**
* Sets the value of the algorithm property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setAlgorithm(String value) {
this.algorithm = value;
}
}

View File

@ -0,0 +1,108 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
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 javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>
* Java class for SignaturePropertiesType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="SignaturePropertiesType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureProperty" maxOccurs="unbounded"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SignaturePropertiesType", propOrder = { "signatureProperty" })
public class SignaturePropertiesType {
@XmlElement(name = "SignatureProperty", required = true)
protected List<SignaturePropertyType> signatureProperty;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the signatureProperty property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the signatureProperty property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getSignatureProperty().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SignaturePropertyType }
*
*
*/
public List<SignaturePropertyType> getSignatureProperty() {
if (signatureProperty == null) {
signatureProperty = new ArrayList<SignaturePropertyType>();
}
return this.signatureProperty;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}

View File

@ -0,0 +1,136 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.w3c.dom.Element;
/**
* <p>
* Java class for SignaturePropertyType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="SignaturePropertyType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;choice maxOccurs="unbounded"&gt;
* &lt;any processContents='lax' namespace='##other'/&gt;
* &lt;/choice&gt;
* &lt;attribute name="Target" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SignaturePropertyType", propOrder = { "content" })
public class SignaturePropertyType {
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
@XmlAttribute(name = "Target", required = true)
@XmlSchemaType(name = "anyURI")
protected String target;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Element }
* {@link Object } {@link String }
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
/**
* Gets the value of the target property.
*
* @return possible object is {@link String }
*
*/
public String getTarget() {
return target;
}
/**
* Sets the value of the target property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTarget(String value) {
this.target = value;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}

View File

@ -0,0 +1,181 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
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 javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>
* Java class for SignatureType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="SignatureType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignedInfo"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureValue"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}KeyInfo" minOccurs="0"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Object" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SignatureType", propOrder = { "signedInfo", "signatureValue",
"keyInfo", "object" })
public class SignatureType {
@XmlElement(name = "SignedInfo", required = true)
protected SignedInfoType signedInfo;
@XmlElement(name = "SignatureValue", required = true)
protected SignatureValueType signatureValue;
@XmlElement(name = "KeyInfo")
protected KeyInfoType keyInfo;
@XmlElement(name = "Object")
protected List<ObjectType> object;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the signedInfo property.
*
* @return possible object is {@link SignedInfoType }
*
*/
public SignedInfoType getSignedInfo() {
return signedInfo;
}
/**
* Sets the value of the signedInfo property.
*
* @param value
* allowed object is {@link SignedInfoType }
*
*/
public void setSignedInfo(SignedInfoType value) {
this.signedInfo = value;
}
/**
* Gets the value of the signatureValue property.
*
* @return possible object is {@link SignatureValueType }
*
*/
public SignatureValueType getSignatureValue() {
return signatureValue;
}
/**
* Sets the value of the signatureValue property.
*
* @param value
* allowed object is {@link SignatureValueType }
*
*/
public void setSignatureValue(SignatureValueType value) {
this.signatureValue = value;
}
/**
* Gets the value of the keyInfo property.
*
* @return possible object is {@link KeyInfoType }
*
*/
public KeyInfoType getKeyInfo() {
return keyInfo;
}
/**
* Sets the value of the keyInfo property.
*
* @param value
* allowed object is {@link KeyInfoType }
*
*/
public void setKeyInfo(KeyInfoType value) {
this.keyInfo = value;
}
/**
* Gets the value of the object property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the object property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getObject().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ObjectType }
*
*
*/
public List<ObjectType> getObject() {
if (object == null) {
object = new ArrayList<ObjectType>();
}
return this.object;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}

View File

@ -0,0 +1,92 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>
* Java class for SignatureValueType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="SignatureValueType"&gt;
* &lt;simpleContent&gt;
* &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>base64Binary"&gt;
* &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
* &lt;/extension&gt;
* &lt;/simpleContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SignatureValueType", propOrder = { "value" })
public class SignatureValueType {
@XmlValue
protected byte[] value;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the value property.
*
* @return possible object is byte[]
*/
public byte[] getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is byte[]
*/
public void setValue(byte[] value) {
this.value = value;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}

View File

@ -0,0 +1,157 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
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 javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>
* Java class for SignedInfoType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="SignedInfoType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureMethod"/&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/&gt;
* &lt;/sequence&gt;
* &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SignedInfoType", propOrder = { "canonicalizationMethod",
"signatureMethod", "reference" })
public class SignedInfoType {
@XmlElement(name = "CanonicalizationMethod", required = true)
protected CanonicalizationMethodType canonicalizationMethod;
@XmlElement(name = "SignatureMethod", required = true)
protected SignatureMethodType signatureMethod;
@XmlElement(name = "Reference", required = true)
protected List<ReferenceType> reference;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the canonicalizationMethod property.
*
* @return possible object is {@link CanonicalizationMethodType }
*
*/
public CanonicalizationMethodType getCanonicalizationMethod() {
return canonicalizationMethod;
}
/**
* Sets the value of the canonicalizationMethod property.
*
* @param value
* allowed object is {@link CanonicalizationMethodType }
*
*/
public void setCanonicalizationMethod(CanonicalizationMethodType value) {
this.canonicalizationMethod = value;
}
/**
* Gets the value of the signatureMethod property.
*
* @return possible object is {@link SignatureMethodType }
*
*/
public SignatureMethodType getSignatureMethod() {
return signatureMethod;
}
/**
* Sets the value of the signatureMethod property.
*
* @param value
* allowed object is {@link SignatureMethodType }
*
*/
public void setSignatureMethod(SignatureMethodType value) {
this.signatureMethod = value;
}
/**
* Gets the value of the reference property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the reference property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getReference().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ReferenceType }
*
*
*/
public List<ReferenceType> getReference() {
if (reference == null) {
reference = new ArrayList<ReferenceType>();
}
return this.reference;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}

View File

@ -0,0 +1,343 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.w3c.dom.Element;
/**
* <p>
* Java class for SoftwareIdentity complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="SoftwareIdentity"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}BaseElement"&gt;
* &lt;choice maxOccurs="unbounded"&gt;
* &lt;element name="Entity" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Entity" maxOccurs="unbounded"/&gt;
* &lt;element name="Evidence" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Evidence" minOccurs="0"/&gt;
* &lt;element name="Link" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Link" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;element name="Meta" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}SoftwareMeta" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;element name="Payload" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}ResourceCollection" minOccurs="0"/&gt;
* &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/choice&gt;
* &lt;attribute name="corpus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
* &lt;attribute name="patch" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
* &lt;attribute name="media" type="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Media" /&gt;
* &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="supplemental" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /&gt;
* &lt;attribute name="tagId" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="tagVersion" type="{http://www.w3.org/2001/XMLSchema}integer" default="0" /&gt;
* &lt;attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" default="0.0" /&gt;
* &lt;attribute name="versionScheme" type="{http://www.w3.org/2001/XMLSchema}NMTOKEN" default="multipartnumeric" /&gt;
* &lt;anyAttribute processContents='lax' namespace='##other'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SoftwareIdentity", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", propOrder = { "entityOrEvidenceOrLink" })
public class SoftwareIdentity extends BaseElement {
@XmlElementRefs({
@XmlElementRef(name = "Evidence", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = JAXBElement.class, required = false),
@XmlElementRef(name = "Meta", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = JAXBElement.class, required = false),
@XmlElementRef(name = "Entity", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = JAXBElement.class, required = false),
@XmlElementRef(name = "Payload", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = JAXBElement.class, required = false),
@XmlElementRef(name = "Link", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd", type = JAXBElement.class, required = false) })
@XmlAnyElement(lax = true)
protected List<Object> entityOrEvidenceOrLink;
@XmlAttribute(name = "corpus")
protected Boolean corpus;
@XmlAttribute(name = "patch")
protected Boolean patch;
@XmlAttribute(name = "media")
protected String media;
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "supplemental")
protected Boolean supplemental;
@XmlAttribute(name = "tagId", required = true)
protected String tagId;
@XmlAttribute(name = "tagVersion")
protected BigInteger tagVersion;
@XmlAttribute(name = "version")
protected String version;
@XmlAttribute(name = "versionScheme")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NMTOKEN")
protected String versionScheme;
/**
* Gets the value of the entityOrEvidenceOrLink property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the entityOrEvidenceOrLink property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getEntityOrEvidenceOrLink().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link JAXBElement }{@code <}{@link Evidence }{@code >} {@link JAXBElement }
* {@code <}{@link SoftwareMeta }{@code >} {@link JAXBElement }{@code <}
* {@link Entity }{@code >} {@link Element } {@link JAXBElement }{@code <}
* {@link ResourceCollection }{@code >} {@link Object } {@link JAXBElement }
* {@code <}{@link Link }{@code >}
*
*
*/
public List<Object> getEntityOrEvidenceOrLink() {
if (entityOrEvidenceOrLink == null) {
entityOrEvidenceOrLink = new ArrayList<Object>();
}
return this.entityOrEvidenceOrLink;
}
/**
* Gets the value of the corpus property.
*
* @return possible object is {@link Boolean }
*
*/
public boolean isCorpus() {
if (corpus == null) {
return false;
} else {
return corpus;
}
}
/**
* Sets the value of the corpus property.
*
* @param value
* allowed object is {@link Boolean }
*
*/
public void setCorpus(Boolean value) {
this.corpus = value;
}
/**
* Gets the value of the patch property.
*
* @return possible object is {@link Boolean }
*
*/
public boolean isPatch() {
if (patch == null) {
return false;
} else {
return patch;
}
}
/**
* Sets the value of the patch property.
*
* @param value
* allowed object is {@link Boolean }
*
*/
public void setPatch(Boolean value) {
this.patch = value;
}
/**
* Gets the value of the media property.
*
* @return possible object is {@link String }
*
*/
public String getMedia() {
return media;
}
/**
* Sets the value of the media property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setMedia(String value) {
this.media = value;
}
/**
* Gets the value of the name property.
*
* @return possible object is {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the supplemental property.
*
* @return possible object is {@link Boolean }
*
*/
public boolean isSupplemental() {
if (supplemental == null) {
return false;
} else {
return supplemental;
}
}
/**
* Sets the value of the supplemental property.
*
* @param value
* allowed object is {@link Boolean }
*
*/
public void setSupplemental(Boolean value) {
this.supplemental = value;
}
/**
* Gets the value of the tagId property.
*
* @return possible object is {@link String }
*
*/
public String getTagId() {
return tagId;
}
/**
* Sets the value of the tagId property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTagId(String value) {
this.tagId = value;
}
/**
* Gets the value of the tagVersion property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getTagVersion() {
if (tagVersion == null) {
return new BigInteger("0");
} else {
return tagVersion;
}
}
/**
* Sets the value of the tagVersion property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setTagVersion(BigInteger value) {
this.tagVersion = value;
}
/**
* Gets the value of the version property.
*
* @return possible object is {@link String }
*
*/
public String getVersion() {
if (version == null) {
return "0.0";
} else {
return version;
}
}
/**
* Sets the value of the version property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setVersion(String value) {
this.version = value;
}
/**
* Gets the value of the versionScheme property.
*
* @return possible object is {@link String }
*
*/
public String getVersionScheme() {
if (versionScheme == null) {
return "multipartnumeric";
} else {
return versionScheme;
}
}
/**
* Sets the value of the versionScheme property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setVersionScheme(String value) {
this.versionScheme = value;
}
}

View File

@ -0,0 +1,400 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for SoftwareMeta complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="SoftwareMeta"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://standards.iso.org/iso/19770/-2/2015/schema.xsd}Meta"&gt;
* &lt;attribute name="activationStatus" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="channelType" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="colloquialVersion" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="edition" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="entitlementDataRequired" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
* &lt;attribute name="entitlementKey" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="generator" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="persistentId" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="product" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="productFamily" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="revision" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="summary" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="unspscCode" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;attribute name="unspscVersion" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
* &lt;anyAttribute processContents='lax'/&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SoftwareMeta", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
public class SoftwareMeta extends Meta {
@XmlAttribute(name = "activationStatus")
protected String activationStatus;
@XmlAttribute(name = "channelType")
protected String channelType;
@XmlAttribute(name = "colloquialVersion")
protected String colloquialVersion;
@XmlAttribute(name = "description")
protected String description;
@XmlAttribute(name = "edition")
protected String edition;
@XmlAttribute(name = "entitlementDataRequired")
protected Boolean entitlementDataRequired;
@XmlAttribute(name = "entitlementKey")
protected String entitlementKey;
@XmlAttribute(name = "generator")
protected String generator;
@XmlAttribute(name = "persistentId")
protected String persistentId;
@XmlAttribute(name = "product")
protected String product;
@XmlAttribute(name = "productFamily")
protected String productFamily;
@XmlAttribute(name = "revision")
protected String revision;
@XmlAttribute(name = "summary")
protected String summary;
@XmlAttribute(name = "unspscCode")
protected String unspscCode;
@XmlAttribute(name = "unspscVersion")
protected String unspscVersion;
/**
* Gets the value of the activationStatus property.
*
* @return possible object is {@link String }
*
*/
public String getActivationStatus() {
return activationStatus;
}
/**
* Sets the value of the activationStatus property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setActivationStatus(String value) {
this.activationStatus = value;
}
/**
* Gets the value of the channelType property.
*
* @return possible object is {@link String }
*
*/
public String getChannelType() {
return channelType;
}
/**
* Sets the value of the channelType property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setChannelType(String value) {
this.channelType = value;
}
/**
* Gets the value of the colloquialVersion property.
*
* @return possible object is {@link String }
*
*/
public String getColloquialVersion() {
return colloquialVersion;
}
/**
* Sets the value of the colloquialVersion property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setColloquialVersion(String value) {
this.colloquialVersion = value;
}
/**
* Gets the value of the description property.
*
* @return possible object is {@link String }
*
*/
public String getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setDescription(String value) {
this.description = value;
}
/**
* Gets the value of the edition property.
*
* @return possible object is {@link String }
*
*/
public String getEdition() {
return edition;
}
/**
* Sets the value of the edition property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setEdition(String value) {
this.edition = value;
}
/**
* Gets the value of the entitlementDataRequired property.
*
* @return possible object is {@link Boolean }
*
*/
public Boolean isEntitlementDataRequired() {
return entitlementDataRequired;
}
/**
* Sets the value of the entitlementDataRequired property.
*
* @param value
* allowed object is {@link Boolean }
*
*/
public void setEntitlementDataRequired(Boolean value) {
this.entitlementDataRequired = value;
}
/**
* Gets the value of the entitlementKey property.
*
* @return possible object is {@link String }
*
*/
public String getEntitlementKey() {
return entitlementKey;
}
/**
* Sets the value of the entitlementKey property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setEntitlementKey(String value) {
this.entitlementKey = value;
}
/**
* Gets the value of the generator property.
*
* @return possible object is {@link String }
*
*/
public String getGenerator() {
return generator;
}
/**
* Sets the value of the generator property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setGenerator(String value) {
this.generator = value;
}
/**
* Gets the value of the persistentId property.
*
* @return possible object is {@link String }
*
*/
public String getPersistentId() {
return persistentId;
}
/**
* Sets the value of the persistentId property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setPersistentId(String value) {
this.persistentId = value;
}
/**
* Gets the value of the product property.
*
* @return possible object is {@link String }
*
*/
public String getProduct() {
return product;
}
/**
* Sets the value of the product property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setProduct(String value) {
this.product = value;
}
/**
* Gets the value of the productFamily property.
*
* @return possible object is {@link String }
*
*/
public String getProductFamily() {
return productFamily;
}
/**
* Sets the value of the productFamily property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setProductFamily(String value) {
this.productFamily = value;
}
/**
* Gets the value of the revision property.
*
* @return possible object is {@link String }
*
*/
public String getRevision() {
return revision;
}
/**
* Sets the value of the revision property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setRevision(String value) {
this.revision = value;
}
/**
* Gets the value of the summary property.
*
* @return possible object is {@link String }
*
*/
public String getSummary() {
return summary;
}
/**
* Sets the value of the summary property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setSummary(String value) {
this.summary = value;
}
/**
* Gets the value of the unspscCode property.
*
* @return possible object is {@link String }
*
*/
public String getUnspscCode() {
return unspscCode;
}
/**
* Sets the value of the unspscCode property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setUnspscCode(String value) {
this.unspscCode = value;
}
/**
* Gets the value of the unspscVersion property.
*
* @return possible object is {@link String }
*
*/
public String getUnspscVersion() {
return unspscVersion;
}
/**
* Sets the value of the unspscVersion property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setUnspscVersion(String value) {
this.unspscVersion = value;
}
}

View File

@ -0,0 +1,111 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>
* Java class for TransformType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="TransformType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;choice maxOccurs="unbounded" minOccurs="0"&gt;
* &lt;any processContents='lax' namespace='##other'/&gt;
* &lt;element name="XPath" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/choice&gt;
* &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TransformType", propOrder = { "content" })
public class TransformType {
@XmlElementRef(name = "XPath", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false)
@XmlMixed
@XmlAnyElement(lax = true)
protected List<Object> content;
@XmlAttribute(name = "Algorithm", required = true)
@XmlSchemaType(name = "anyURI")
protected String algorithm;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Object }
* {@link String } {@link Element } {@link JAXBElement }{@code <}{@link String }
* {@code >}
*
*
*/
public List<Object> getContent() {
if (content == null) {
content = new ArrayList<Object>();
}
return this.content;
}
/**
* Gets the value of the algorithm property.
*
* @return possible object is {@link String }
*
*/
public String getAlgorithm() {
return algorithm;
}
/**
* Sets the value of the algorithm property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setAlgorithm(String value) {
this.algorithm = value;
}
}

View File

@ -0,0 +1,76 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for TransformsType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="TransformsType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element ref="{http://www.w3.org/2000/09/xmldsig#}Transform" maxOccurs="unbounded"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TransformsType", propOrder = { "transform" })
public class TransformsType {
@XmlElement(name = "Transform", required = true)
protected List<TransformType> transform;
/**
* Gets the value of the transform property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the transform property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getTransform().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TransformType }
*
*
*/
public List<TransformType> getTransform() {
if (transform == null) {
transform = new ArrayList<TransformType>();
}
return this.transform;
}
}

View File

@ -0,0 +1,83 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for Use.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
*
* <pre>
* &lt;simpleType name="Use"&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN"&gt;
* &lt;enumeration value="required"/&gt;
* &lt;enumeration value="recommended"/&gt;
* &lt;enumeration value="optional"/&gt;
* &lt;/restriction&gt;
* &lt;/simpleType&gt;
* </pre>
*
*/
@XmlType(name = "Use", namespace = "http://standards.iso.org/iso/19770/-2/2015/schema.xsd")
@XmlEnum
public enum Use {
/**
*
* The [Link]'d software is absolutely required for installation
*
*
*/
@XmlEnumValue("required")
REQUIRED("required"),
/**
*
* Not absolutely required, but install unless directed not to
*
*
*/
@XmlEnumValue("recommended")
RECOMMENDED("recommended"),
/**
*
* Not absolutely required, install only when asked
*
*
*/
@XmlEnumValue("optional")
OPTIONAL("optional");
private final String value;
Use(String v) {
value = v;
}
public String value() {
return value;
}
public static Use fromValue(String v) {
for (Use c : Use.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}

View File

@ -0,0 +1,99 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>
* Java class for X509DataType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="X509DataType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence maxOccurs="unbounded"&gt;
* &lt;choice&gt;
* &lt;element name="X509IssuerSerial" type="{http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType"/&gt;
* &lt;element name="X509SKI" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/&gt;
* &lt;element name="X509SubjectName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="X509Certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/&gt;
* &lt;element name="X509CRL" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/&gt;
* &lt;any processContents='lax' namespace='##other'/&gt;
* &lt;/choice&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "X509DataType", propOrder = { "x509IssuerSerialOrX509SKIOrX509SubjectName" })
public class X509DataType {
@XmlElementRefs({
@XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false),
@XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) })
@XmlAnyElement(lax = true)
protected List<Object> x509IssuerSerialOrX509SKIOrX509SubjectName;
/**
* Gets the value of the x509IssuerSerialOrX509SKIOrX509SubjectName
* property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the
* x509IssuerSerialOrX509SKIOrX509SubjectName property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getX509IssuerSerialOrX509SKIOrX509SubjectName().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link JAXBElement }{@code <}{@link byte[]}{@code >} {@link JAXBElement }
* {@code <}{@link X509IssuerSerialType }{@code >} {@link Element }
* {@link JAXBElement }{@code <}{@link byte[]}{@code >} {@link Object }
* {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement }
* {@code <}{@link byte[]}{@code >}
*
*
*/
public List<Object> getX509IssuerSerialOrX509SKIOrX509SubjectName() {
if (x509IssuerSerialOrX509SKIOrX509SubjectName == null) {
x509IssuerSerialOrX509SKIOrX509SubjectName = new ArrayList<Object>();
}
return this.x509IssuerSerialOrX509SKIOrX509SubjectName;
}
}

View File

@ -0,0 +1,91 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
package hirs.swid.xjc;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for X509IssuerSerialType complex type.
* </p>
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* </p>
* <pre>
* &lt;complexType name="X509IssuerSerialType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="X509IssuerName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="X509SerialNumber" type="{http://www.w3.org/2001/XMLSchema}integer"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "X509IssuerSerialType", propOrder = { "x509IssuerName",
"x509SerialNumber" })
public class X509IssuerSerialType {
@XmlElement(name = "X509IssuerName", required = true)
protected String x509IssuerName;
@XmlElement(name = "X509SerialNumber", required = true)
protected BigInteger x509SerialNumber;
/**
* Gets the value of the x509IssuerName property.
*
* @return possible object is {@link String }
*
*/
public String getX509IssuerName() {
return x509IssuerName;
}
/**
* Sets the value of the x509IssuerName property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setX509IssuerName(String value) {
this.x509IssuerName = value;
}
/**
* Gets the value of the x509SerialNumber property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getX509SerialNumber() {
return x509SerialNumber;
}
/**
* Sets the value of the x509SerialNumber property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setX509SerialNumber(BigInteger value) {
this.x509SerialNumber = value;
}
}

View File

@ -0,0 +1,10 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.20 at 08:11:19 AM EDT
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2000/09/xmldsig#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package hirs.swid.xjc;

View File

@ -0,0 +1,16 @@
# Software Identity
softwareIdentity.name=HIRS SWID Tag application
softwareIdentity.tagId=hirs.swid.SwidTags
softwareIdentity.tagVersion=
softwareIdentity.version=0.1
softwareIdentity.versionScheme=
softwareIdentity.media=
softwareIdentity.corpus=false
softwareIdentity.patch=false
softwareIdentity.supplemental=false
# Entity
entity.name=HIRS
entity.regid=hirs.org
entity.role=softwareCreator,tagCreator
#entity.thumbprint=

View File

@ -0,0 +1,61 @@
# Software Identity
softwareIdentity.name=HIRS SWID Tag example
softwareIdentity.tagId=hirs.swid.SwidTags.example
softwareIdentity.tagVersion=
softwareIdentity.version=0.1
softwareIdentity.versionScheme=
softwareIdentity.media=
softwareIdentity.corpus=false
softwareIdentity.patch=false
softwareIdentity.supplemental=false
# Entity
entity.name=HIRS
entity.regid=hirs.org
entity.role=softwareCreator,tagCreator
#entity.thumbprint=
# Link
link.href=https://Example.com/support/ProductA/firmware/installfiles
link.rel=installationmedia
# Software Meta
softwareMeta.activationStatus=
softwareMeta.channelType=
softwareMeta.colloquialVersion=
softwareMeta.description=
softwareMeta.edition=
softwareMeta.entitlementDataRequired=
softwareMeta.entitlementKey=
softwareMeta.generator=
softwareMeta.persistentId=
softwareMeta.product=
softwareMeta.productFamily=
softwareMeta.revision=
softwareMeta.summary=
softwareMeta.unspscCode=
softwareMeta.unspscVersion=
softwareMeta.pcUriLocal=/boot/tcg/manifest/swidtag
softwareMeta.bindingSpec=IOT RIM
softwareMeta.bindingSpecVersion=1.2
softwareMeta.platformManufacturerId=00201234
softwareMeta.platformManufacturerStr=Example.com
softwareMeta.platformModel=ProductA
softwareMeta.componentClass=Firmware
softwareMeta.componentManufacturer=BIOSVendorA
softwareMeta.componentManufacturerId=00213022
softwareMeta.rimLinkHash=88f21d8e44d4271149297404df91caf207130bfa116582408abd04ede6db7f51
# Payload
n8060.envvarprefix=$
n8060.envvarsuffix=
n8060.pathseparator=/
directory.key=false
directory.location=/boot/iot/
directory.name=iotBase
directory.root=
file.key=
file.name=
file.size=
file.version=
file.hash=

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,128 @@
package hirs.swid;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;
public class TestSwidTagGateway {
private SwidTagGateway gateway;
private String inputFile, outputFile, hashType;
private InputStream expectedFile;
private static final String TEST_CSV_INPUT = "testCsv.swidtag";
private static final String TEST_BLANK_SWIDTAG = "generated_swidTag.swidtag";
@BeforeClass
public void setUp() throws Exception {
gateway = new SwidTagGateway();
inputFile = TestSwidTagGateway.class.getClassLoader().getResource("examplecsv.csv").getFile();
hashType = "SHA256";
}
@AfterClass
public void tearDown() throws Exception {
if (expectedFile != null) {
expectedFile.close();
}
}
@Test
public void testGenerateSwidTagStringStringString() {
outputFile = "testGenerateSwidTagStringStringString.swidtag";
gateway.generateSwidTag(inputFile, outputFile, hashType);
expectedFile = (InputStream) TestSwidTagGateway.class.getClassLoader().getResourceAsStream(TEST_CSV_INPUT);
Assert.assertTrue(compareFileBytesToExpectedFile(outputFile));
}
@Test
public void testGenerateSwidTagFile() {
outputFile = "testGenerateSwidTagFile.swidtag";
gateway.generateSwidTag(new File(outputFile));
expectedFile = (InputStream) TestSwidTagGateway.class.getClassLoader().getResourceAsStream(TEST_BLANK_SWIDTAG);
Assert.assertTrue(compareFileBytesToExpectedFile(outputFile));
}
@Test
public void testValidateSwidTag() {
try {
Assert.assertTrue(gateway.validateSwidTag(TestSwidTagGateway.class.getClassLoader().getResource(TEST_BLANK_SWIDTAG).getPath()));
} catch (IOException e) {
Assert.fail("Invalid swidtag!");
}
}
@Test
public void testParsePayload() {
InputStream is = null;
try {
is = gateway.parsePayload(outputFile);
Scanner scanner = new Scanner(is, "UTF-8");
String test = "PCR0,18382098108101841048";
String temp = "";
while (scanner.hasNext()) {
temp = scanner.next();
}
Assert.assertEquals(test, temp);
} catch (IOException e) {
Assert.fail("Error parsing test file!");
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
Assert.fail("Failed to close input stream!");
}
}
}
}
private boolean compareFileBytesToExpectedFile(String file) {
FileInputStream testFile = null;
try {
int data;
testFile = new FileInputStream(file);
while ((data = testFile.read()) != -1) {
int expected = expectedFile.read();
if (data != expected) {
System.out.println("Expected: " + expected);
System.out.println("Got: " + data);
return false;
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
return false;
} catch (IOException e) {
e.printStackTrace();
return false;
} catch (NullPointerException e) {
e.printStackTrace();
return false;
} finally {
if (testFile != null) {
try {
testFile.close();
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
if (expectedFile != null) {
try {
expectedFile.close();
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
}
return true;
}
}

View File

@ -0,0 +1,6 @@
PCR0,18382098108101841048
1 PCR0 18382098108101841048

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SoftwareIdentity xmlns="http://standards.iso.org/iso/19770/-2/2015/schema.xsd" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" corpus="false" patch="false" name="HIRS SWID Tag example" supplemental="false" tagId="hirs.swid.SwidTags.example" version="0.1">
<Entity name="HIRS" regid="hirs.org" role="softwareCreator tagCreator"/>
<Link href="https://Example.com/support/ProductA/firmware/installfiles" rel="installationmedia"/>
<Meta xmlns:rim="https://trustedcomputinggroup.org/wp-content/uploads/TCG_RIM_Model" rim:componentManufacturerId="00213022" rim:platformManufacturerId="00201234" rim:bindingSpec="IOT RIM" rim:pcURILocal="/boot/tcg/manifest/swidtag" rim:componentManufacturer="BIOSVendorA" rim:rimLinkHash="88f21d8e44d4271149297404df91caf207130bfa116582408abd04ede6db7f51" rim:componentClass="Firmware" rim:platformManufacturerStr="Example.com" rim:platformModel="ProductA" rim:bindingSpecVersion="1.2"/>
<Payload xmlns:n8060="http://csrc.nist.gov/ns/swid/2015-extensions/1.0" n8060:envVarPrefix="$" n8060:pathSeparator="/" n8060:envVarSuffix="">
<Directory location="/boot/iot/" name="iotBase">
<File xmlns:SHA256="http://www.w3.org/2001/04/xmlenc#sha256" size="15400" version="01.00" name="Example.com.iotBase.bin" SHA256:hash="688e293e3ccb522f6cf8a027c9ade7960f84bd0bf3a0b99812bc1fa498a2db8d"/>
<File xmlns:SHA256="http://www.w3.org/2001/04/xmlenc#sha256" size="1024" version="01.00" name="iotExec.bin" SHA256:hash="7afb71275b8036a43d75f3bf1a4b84867de289b2edc6980890ec9748a112156e"/>
</Directory>
</Payload>
</SoftwareIdentity>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SoftwareIdentity xmlns="http://standards.iso.org/iso/19770/-2/2015/schema.xsd" xmlns:ns2="http://www.w3.org/2000/09/xmldsig#" corpus="false" patch="false" name="HIRS SWID Tag application" supplemental="false" tagId="hirs.swid.SwidTags" version="0.1">
<Entity name="HIRS" regid="hirs.org" role="softwareCreator tagCreator"/>
<Payload>
<File name="PCR0" ns2:SHA256="18382098108101841048"/>
</Payload>
</SoftwareIdentity>

View File

@ -6,4 +6,5 @@ include 'TPM_Utils',
'HIRS_Structs',
'HIRS_AttestationCA',
'HIRS_AttestationCAPortal',
'ACA_SwidTag',
'tpm_module'