mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-18 20:47:58 +00:00
Do not assign the default attributes file in the absence of a user-provided argument
This commit is contained in:
parent
c3aaba5eba
commit
f0b8e89bab
@ -82,11 +82,14 @@ public class Main {
|
||||
case "BASE":
|
||||
if (!attributesFile.isEmpty()) {
|
||||
gateway.setAttributesFile(attributesFile);
|
||||
} else {
|
||||
System.out.println("An attribute file is required.");
|
||||
System.exit(1);
|
||||
}
|
||||
if (!rimEventLog.isEmpty()) {
|
||||
gateway.setRimEventLog(rimEventLog);
|
||||
} else {
|
||||
System.out.println("Error: a support RIM is required!");
|
||||
System.out.println("A support RIM is required.");
|
||||
System.exit(1);
|
||||
}
|
||||
credValidator = new CredentialArgumentValidator("" ,
|
||||
|
@ -99,7 +99,7 @@ public class SwidTagGateway {
|
||||
try {
|
||||
JAXBContext jaxbContext = JAXBContext.newInstance(SwidTagConstants.SCHEMA_PACKAGE);
|
||||
marshaller = jaxbContext.createMarshaller();
|
||||
attributesFile = SwidTagConstants.DEFAULT_ATTRIBUTES_FILE;
|
||||
attributesFile = "";
|
||||
defaultCredentials = true;
|
||||
pemCertificateFile = "";
|
||||
embeddedCert = false;
|
||||
|
@ -24,7 +24,7 @@ public class Commander {
|
||||
private boolean version = false;
|
||||
@Parameter(names = {"-a", "--attributes <path>"}, order = 1,
|
||||
description = "The configuration file holding attributes "
|
||||
+ "to populate the base RIM with.")
|
||||
+ "to populate the base RIM with. An example file can be found in /opt/rimtool/data.")
|
||||
private String attributesFile = "";
|
||||
@Parameter(names = {"-o", "--out <path>"}, order = 2,
|
||||
description = "The file to write the RIM out to. "
|
||||
@ -45,7 +45,7 @@ public class Commander {
|
||||
description = "Embed the provided certificate in the signed swidtag.")
|
||||
private boolean embedded = false;
|
||||
@Parameter(names = {"-d", "--default-key"}, order = 8,
|
||||
description = "Use default signing credentials.")
|
||||
description = "Use the JKS keystore installed in /opt/rimtool/data.")
|
||||
private boolean defaultKey = false;
|
||||
@Parameter(names = {"-l", "--rimel <path>"}, order = 9,
|
||||
description = "The TCG eventlog file to use as a support RIM.")
|
||||
|
Loading…
Reference in New Issue
Block a user