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
fbf3de2517
commit
808e05b71c
@ -92,11 +92,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;
|
||||
|
@ -26,7 +26,7 @@ public class Commander {
|
||||
private boolean version = false;
|
||||
@Parameter(names = {"-a", "--attributes <path>"}, validateWith = FileArgumentValidator.class,
|
||||
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. "
|
||||
@ -51,7 +51,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>"}, validateWith = FileArgumentValidator.class,
|
||||
description = "The TCG eventlog file to use as a support RIM.")
|
||||
|
Loading…
Reference in New Issue
Block a user