From 094efb37df23ae9b4e0ca178b82ce0a64482c353 Mon Sep 17 00:00:00 2001 From: chubtub <43381989+chubtub@users.noreply.github.com> Date: Tue, 25 Feb 2020 14:13:08 -0500 Subject: [PATCH 1/2] Added CLI arg to control hiding/showing signature cert (default=hide) --- tools/tcg_rim_tool/keystore.jks | Bin 2233 -> 2226 bytes .../src/main/java/hirs/swid/Main.java | 13 +++---- .../main/java/hirs/swid/SwidTagGateway.java | 35 +++++++++++++++++- .../main/java/hirs/swid/utils/Commander.java | 32 ++++++++++++---- 4 files changed, 63 insertions(+), 17 deletions(-) diff --git a/tools/tcg_rim_tool/keystore.jks b/tools/tcg_rim_tool/keystore.jks index 0c5bc1d7d79494dc9de2140046c0679e8f626427..1102b2c52673157be8475cf71df10832de6a1e9a 100644 GIT binary patch literal 2226 zcmbtVc{tQ-8=loNhA~DGV=Bfv;y3m^p(1Oxq(NdZc99~(F&UMTC2M_IVklvvjZr6s zAwtnu$};w(vLx#%Mv4c;7%E5M-yozY7sb4)%+r z_=l2xcc^f{rFIVp1cv}L7!MHPLlF4DFt7>)4F^Q)ar^NU6TNZzNyw?&Lyi zF6Vx->FWT*pKxAzi9slu#?kgH+)|-*X_FPVaQyP-Bo7M!KB2`RO^qF)`&vD|k0LUCh%*)IS&2 z^~|keuL(;Mr;f?Hxmrjy%g(B2_$Hh)NR|=J7Rt~bL78INFBi5++;>;!c#6t3L5-$A zLUcK5-_AQ$e(y-L!i(6Ioss4kIpFQYvgLEVDVC?yT{?}-+Nqt91JT`O0vU7j}gcv9eqW9I(V-(bgKQM=Fgr=HSJAL`6jJvRZR(h!THvozMYE6 z`dL8XV)Z_}dvPV6x2mfx!Ow`Z7uj|Ve`y^i5*p|xy$_pJ<&y0YG|Ae^Y>TS*uH6+>w!*l9g>%TD?opH-c^CJtqfj_dlSBP+7?cm|oF_u_9x+C6d z7wO&-3~nZ0ceF!GA@R{}nXjf(+~5e+pWNYMyZb7-&0&NBp8CVO2o;k!xvpT7i=^&T z5{n++`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-D=!biv*Kd3e^a;S4qsH_a#x(X7Pw2B zv?O%#LyL4xVLY8vsb(B~$dF}IA}#4z!PJsad;6quj63~X+_<~wuE({FDjA*1U$plR z6rXR41{_QmEBnR2&AW;iIX-);Ma+N2$JsExf8wDUrb@bmcqZsHO+bL6)8l{bai%~v znxvW*X-%P~M}0^LwUW6}QH2}>XWS@VYw?qKvkA>~<0S1lEWR7Aa*WFvI^|N)%IGxD%-J3##Smc<))D1qV(|FhhorBm1TS7lp*qRUo8w0LSAOT-Xo<-Rj z*gn=mPVP@JTr;CF@hTyE(V%*Qc;Z}!NZ&H=QV1|ax}^7X&hPv}-Gev63j!*U)C0ww z9iQiDn?0&i*4h5eKntbtS>F2d;f+`sl74|Y`%ul~s#o#F6!~s1NV#6;;-$~Un9D14 zNR)}4YvY9cJ?@*2$0VV8-j=HoYF@hCC285-LI-N4LAPh>E43^-vPzTHo#ALchMX;N zt+uA^C};hCb;;6C4pW_V^Y1e=Cj`X4kqZfP%v#$iYDTJ(csuIHzr&IK4{3P>8U&(y zgdow`BS>J~3_36X219VyZb~Ac49u58v_kfv0KiHQLg10C2xbO49E1S|#_1zZpTy@0 zVS+K@2#y42Pr^S6%QvBDsB_C&XTdgx$`R(2ki z?jDwi^Jkza1OkadBNdQWP-v4AiaepR|E2%0F-U;WzYREf4|F7e9fTkOEMO7GjYA9I@&1JY!1Ey^uPX?y;8VQ9M{JR)89r!>ZOF2JPLXce59kEg;eianzdk^P^*bN~p*5=2}; z2%PLwfDOU};W~4KhGt?R!{Jh`G169Euw!{>_14u79V;d&Lq z=^f)1E+U4aWDQic*|HAhW&lfo9gRuaEx2qXv?x{{+|Fd)^H4f@b#S|TP}3 x509Content = new ArrayList(); x509Content.add(certificate.getSubjectX500Principal().getName()); - x509Content.add(certificate); + if (showCert) { + x509Content.add(certificate); + } X509Data data = kiFactory.newX509Data(x509Content); KeyInfo keyinfo = kiFactory.newKeyInfo(Collections.singletonList(data)); diff --git a/tools/tcg_rim_tool/src/main/java/hirs/swid/utils/Commander.java b/tools/tcg_rim_tool/src/main/java/hirs/swid/utils/Commander.java index 3b155e65..6ac7a813 100644 --- a/tools/tcg_rim_tool/src/main/java/hirs/swid/utils/Commander.java +++ b/tools/tcg_rim_tool/src/main/java/hirs/swid/utils/Commander.java @@ -19,9 +19,8 @@ public class Commander { private static final String HELP_STRING = "help"; private static final String PARSE_STRING = "parse"; private static final String ATTRIBUTES_STRING = "attributes"; - private static final String KEY_STRING = "key"; - private static final String PRIVATE_KEY_STRING = "privatekey"; - private static final String CERT_STRING = "cert"; + private static final String KEYSTORE_STRING = "keystore"; + private static final String SHOW_CERT_STRING = "show-cert"; private boolean hasArguments = false; private boolean validate = false; @@ -29,6 +28,7 @@ public class Commander { private boolean parse = false; private boolean attributesGiven = false; private boolean keystoreGiven = false; + private boolean showCert = false; private String validateFile; private String createOutFile = ""; @@ -106,10 +106,15 @@ public class Commander { parse = true; parseFile = args[++i]; break; - case FULL_COMMAND_PREFIX + KEY_STRING: +/* + case FULL_COMMAND_PREFIX + KEYSTORE_STRING: case COMMAND_PREFIX + "k": keystore = args[++i]; break; +*/ + case FULL_COMMAND_PREFIX + SHOW_CERT_STRING: + showCert = true; + break; case FULL_COMMAND_PREFIX + HELP_STRING: case COMMAND_PREFIX + "h": default: @@ -223,6 +228,14 @@ public class Commander { return keystore; } + /** + * Getter for boolean to show certificate data or not + * @return + */ + public boolean isShowCert() { + return showCert; + } + /** * Default no parameter help method. */ @@ -250,10 +263,13 @@ public class Commander { + " \t\t\t\tvalidates it against the schema at\n" + " \t\t\t\thttp://standards.iso.org/iso/19770/-2/2015/schema.xsd\n\n"); sb.append(" -p, --parse \t\tParse the given swidtag's payload\n\n"); -/* sb.append(" -k, --key\t\t\tSpecify the credential and its location to use\n" - + " \t-privatekey \tfor digital signatures\n" - + " \t-cert \n\n"); -*/ sb.append(" -h, --help, \tPrints this command help information.\n"); +/* + sb.append(" -k, --keystore \tSpecify the keystore and its location to use\n" + + " \t\t\t\tfor digital signatures\n"); + */ + sb.append(" --show-cert\t\t\tPrint the certificate in the signature block of\n" + + " \t\t\t\tthe base RIM\n\n"); + sb.append(" -h, --help, \tPrints this command help information.\n"); sb.append(" \t\t\t\tListing no command arguments will also\n" + " \t\t\t\tprint this help text.\n\n"); sb.append("Example commands: \n" From 3692262055707c9795efa27d3f71a0016ee7cfbb Mon Sep 17 00:00:00 2001 From: chubtub <43381989+chubtub@users.noreply.github.com> Date: Thu, 27 Feb 2020 08:44:12 -0500 Subject: [PATCH 2/2] Clean up unit tests --- .../main/java/hirs/swid/SwidTagGateway.java | 80 +++++++++---------- .../main/java/hirs/swid/utils/Commander.java | 6 -- .../java/hirs/swid/TestSwidTagGateway.java | 53 ++++++++---- .../test/resources/generated_no_cert.swidtag | 34 ++++++++ .../test/resources/generated_swidTag.swidtag | 12 --- .../resources/generated_with_cert.swidtag | 50 ++++++++++++ .../src/test/resources/testCsv.swidtag | 4 +- 7 files changed, 162 insertions(+), 77 deletions(-) create mode 100644 tools/tcg_rim_tool/src/test/resources/generated_no_cert.swidtag delete mode 100644 tools/tcg_rim_tool/src/test/resources/generated_swidTag.swidtag create mode 100644 tools/tcg_rim_tool/src/test/resources/generated_with_cert.swidtag diff --git a/tools/tcg_rim_tool/src/main/java/hirs/swid/SwidTagGateway.java b/tools/tcg_rim_tool/src/main/java/hirs/swid/SwidTagGateway.java index d10c16d2..8673ae36 100644 --- a/tools/tcg_rim_tool/src/main/java/hirs/swid/SwidTagGateway.java +++ b/tools/tcg_rim_tool/src/main/java/hirs/swid/SwidTagGateway.java @@ -388,39 +388,6 @@ public class SwidTagGateway { } } - /** - * Given an input swidtag at [path] parse any PCRs in the payload into an InputStream object. - * This method will be used in a following pull request. - * - * @param path - * @return - * @throws IOException - */ - public ByteArrayInputStream parsePayload(String path) throws IOException { - JAXBElement jaxbe = unmarshallSwidTag(path); - SoftwareIdentity softwareIdentity = (SoftwareIdentity) jaxbe.getValue(); - String pcrs = ""; - if (!softwareIdentity.getEntityOrEvidenceOrLink().isEmpty()) { - List swidtag = softwareIdentity.getEntityOrEvidenceOrLink(); - for (Object obj : swidtag) { - try { - JAXBElement element = (JAXBElement) obj; - String elementName = element.getName().getLocalPart(); - if (elementName.equals(SwidTagConstants.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 creates SoftwareIdentity element based on the parameters read in from * a properties file. @@ -765,6 +732,39 @@ public class SwidTagGateway { } } + /** + * Given an input swidtag at [path] parse any PCRs in the payload into an InputStream object. + * This method will be used in a following pull request. + * + * @param path + * @return + * @throws IOException + */ + public ByteArrayInputStream parsePayload(String path) throws IOException { + JAXBElement jaxbe = unmarshallSwidTag(path); + SoftwareIdentity softwareIdentity = (SoftwareIdentity) jaxbe.getValue(); + String pcrs = ""; + if (!softwareIdentity.getEntityOrEvidenceOrLink().isEmpty()) { + List swidtag = softwareIdentity.getEntityOrEvidenceOrLink(); + for (Object obj : swidtag) { + try { + JAXBElement element = (JAXBElement) obj; + String elementName = element.getName().getLocalPart(); + if (elementName.equals(SwidTagConstants.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 traverses a hirs.swid.xjc.Directory recursively until it finds at * least one hirs.swid.xjc.File. This File is expected to have an attribute of the form @@ -792,7 +792,7 @@ public class SwidTagGateway { if (pcrHash.isEmpty()) { pcrHash = "null"; } - sb.append(pcr.getName() + "," + pcrHash + newline); + sb.append(pcr.getName() + "," + pcrHash); } } System.out.println(sb.toString()); @@ -800,8 +800,8 @@ public class SwidTagGateway { } /** - * This method unmarshalls the swidtag found at [path] and validates it according to the - * schema. + * This method unmarshalls the swidtag found at [path] into a JAXBElement object + * and validates it according to the schema. * * @param path to the input swidtag * @return the SoftwareIdentity element at the root of the swidtag @@ -810,14 +810,14 @@ public class SwidTagGateway { private JAXBElement unmarshallSwidTag(String path) throws IOException { File input = null; InputStream is = null; - JAXBElement jaxbe = null; + JAXBElement swidtag = 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)); unmarshaller.setSchema(schema); - jaxbe = (JAXBElement) unmarshaller.unmarshal(input); + swidtag = (JAXBElement) unmarshaller.unmarshal(input); } catch (SAXException e) { System.out.println("Error setting schema for validation!"); } catch (UnmarshalException e) { @@ -834,8 +834,8 @@ public class SwidTagGateway { System.out.println("Error closing input stream"); } } - if (jaxbe != null) { - return jaxbe; + if (swidtag != null) { + return swidtag; } else { throw new IOException("Invalid swidtag file!"); } diff --git a/tools/tcg_rim_tool/src/main/java/hirs/swid/utils/Commander.java b/tools/tcg_rim_tool/src/main/java/hirs/swid/utils/Commander.java index 6ac7a813..5c51e167 100644 --- a/tools/tcg_rim_tool/src/main/java/hirs/swid/utils/Commander.java +++ b/tools/tcg_rim_tool/src/main/java/hirs/swid/utils/Commander.java @@ -106,12 +106,6 @@ public class Commander { parse = true; parseFile = args[++i]; break; -/* - case FULL_COMMAND_PREFIX + KEYSTORE_STRING: - case COMMAND_PREFIX + "k": - keystore = args[++i]; - break; -*/ case FULL_COMMAND_PREFIX + SHOW_CERT_STRING: showCert = true; break; diff --git a/tools/tcg_rim_tool/src/test/java/hirs/swid/TestSwidTagGateway.java b/tools/tcg_rim_tool/src/test/java/hirs/swid/TestSwidTagGateway.java index e82b9197..bee91cf2 100644 --- a/tools/tcg_rim_tool/src/test/java/hirs/swid/TestSwidTagGateway.java +++ b/tools/tcg_rim_tool/src/test/java/hirs/swid/TestSwidTagGateway.java @@ -15,10 +15,11 @@ import org.testng.annotations.Test; public class TestSwidTagGateway { private SwidTagGateway gateway; private String inputFile, outputFile, hashType; + private final String DEFAULT_OUTPUT = "generated_swidTag.swidtag"; + private final String DEFAULT_WITH_CERT = "generated_with_cert.swidtag"; + private final String DEFAULT_NO_CERT = "generated_no_cert.swidtag"; 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(); @@ -33,43 +34,56 @@ public class TestSwidTagGateway { } } + /** + * Creating a base RIM with default attributes with an X509Certificate element. + */ @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)); + public void testGenerateDefaultWithCert() { + gateway.setShowCert(true); + gateway.generateSwidTag(); + expectedFile = (InputStream) TestSwidTagGateway.class.getClassLoader().getResourceAsStream(DEFAULT_WITH_CERT); + Assert.assertTrue(compareFileBytesToExpectedFile(DEFAULT_OUTPUT)); } + /** + * Create a base RIM with default attributes without an X509Certificate element. + */ @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)); + public void testGenerateDefaultNoCert() { + gateway.setShowCert(false); + gateway.generateSwidTag(); + expectedFile = (InputStream) TestSwidTagGateway.class.getClassLoader().getResourceAsStream(DEFAULT_NO_CERT); + Assert.assertTrue(compareFileBytesToExpectedFile(DEFAULT_OUTPUT)); } + /** + * Validate a base RIM with default attributes with an X509Certificate element. + */ @Test public void testValidateSwidTag() { try { - Assert.assertTrue(gateway.validateSwidTag(TestSwidTagGateway.class.getClassLoader().getResource(TEST_BLANK_SWIDTAG).getPath())); + Assert.assertTrue(gateway.validateSwidTag(TestSwidTagGateway.class.getClassLoader().getResource(DEFAULT_WITH_CERT).getPath())); } catch (IOException e) { Assert.fail("Invalid swidtag!"); } } + /** + * Verify expected values of a File element in a Payload element. + */ @Test public void testParsePayload() { InputStream is = null; + outputFile = TestSwidTagGateway.class.getClassLoader().getResource(DEFAULT_WITH_CERT).getPath(); try { is = gateway.parsePayload(outputFile); Scanner scanner = new Scanner(is, "UTF-8"); - String test = "PCR0,18382098108101841048"; + String test = "Example.com.iotBase.bin,688e293e3ccb522f6cf8a027c9ade7960f84bd0bf3a0b99812bc1fa498a2db8d"; String temp = ""; while (scanner.hasNext()) { temp = scanner.next(); + Assert.assertEquals(temp, test, "temp: " + temp + ", test: " + test); } - Assert.assertEquals(test, temp); } catch (IOException e) { Assert.fail("Error parsing test file!"); } finally { @@ -82,7 +96,12 @@ public class TestSwidTagGateway { } } } - + + /** + * This method compares two files by bytes to determine if they are the same or not. + * @param file to be compared to the expected value. + * @return true if they are equal, false if not. + */ private boolean compareFileBytesToExpectedFile(String file) { FileInputStream testFile = null; try { diff --git a/tools/tcg_rim_tool/src/test/resources/generated_no_cert.swidtag b/tools/tcg_rim_tool/src/test/resources/generated_no_cert.swidtag new file mode 100644 index 00000000..6269de6b --- /dev/null +++ b/tools/tcg_rim_tool/src/test/resources/generated_no_cert.swidtag @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + e3V54WPCVKryiRHONI37GttXgePQDEYz1GGPcpity5E= + + + OMPKPXsLr0wbtQuUTlGAD9W0fkqmw8XJ3nQHc/LsRpzCZWdN/xtfxe3JleLbXcUt4PItqj1uB5Eg +8iBWyBSy+WJYvsoROjLjZ1sUQ92jMdCO69uBjaIihn1HS2H/YnB4trjc92AUIdhoJZt9KF90IlJQ +zu3HTmQfeRYs/c6Ck1k3bL1jnyWoNzhBqCuPYrZtPbv9opVP0YOxM5IjRkRgkZIDgYbh1k4WXw8O +/iIMZuVJDfKQJSNCTAZsIbUatGDQc/nOihLHdI90wG8zu9amgrl1AEKzH8z864Fan5uuXolfAaak +sLJl6RPCNcp+JNCXMMZiS8bmYPQnVJc1ze0I1A== + + + CN=example.RIM.signer,OU=PCClient,O=Example,ST=VA,C=US + + + + diff --git a/tools/tcg_rim_tool/src/test/resources/generated_swidTag.swidtag b/tools/tcg_rim_tool/src/test/resources/generated_swidTag.swidtag deleted file mode 100644 index 6c494993..00000000 --- a/tools/tcg_rim_tool/src/test/resources/generated_swidTag.swidtag +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/tools/tcg_rim_tool/src/test/resources/generated_with_cert.swidtag b/tools/tcg_rim_tool/src/test/resources/generated_with_cert.swidtag new file mode 100644 index 00000000..be75f5a0 --- /dev/null +++ b/tools/tcg_rim_tool/src/test/resources/generated_with_cert.swidtag @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + e3V54WPCVKryiRHONI37GttXgePQDEYz1GGPcpity5E= + + + OMPKPXsLr0wbtQuUTlGAD9W0fkqmw8XJ3nQHc/LsRpzCZWdN/xtfxe3JleLbXcUt4PItqj1uB5Eg +8iBWyBSy+WJYvsoROjLjZ1sUQ92jMdCO69uBjaIihn1HS2H/YnB4trjc92AUIdhoJZt9KF90IlJQ +zu3HTmQfeRYs/c6Ck1k3bL1jnyWoNzhBqCuPYrZtPbv9opVP0YOxM5IjRkRgkZIDgYbh1k4WXw8O +/iIMZuVJDfKQJSNCTAZsIbUatGDQc/nOihLHdI90wG8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ZzNs33Lv6H0m4aff9p6QpMclX5b/CRjl+80JWRLiLj +U3B0CejZB9dJrPr9SBaC31cDoeTpja9Cl86ip7KkqrZZIYeMuNF6ucWyWtjrW2kr3UhmEy8x/6y4 +KigsK8sBwmNv4N2Pu3RppeIcpjYj5NVA1hwRA4eeMgJp2u+urm3l1oo1UNX1HsSSBHp1Owc9zZLm +07Pl8T46kpIA4sroCAU= + + + + diff --git a/tools/tcg_rim_tool/src/test/resources/testCsv.swidtag b/tools/tcg_rim_tool/src/test/resources/testCsv.swidtag index 7583802f..e89f2358 100644 --- a/tools/tcg_rim_tool/src/test/resources/testCsv.swidtag +++ b/tools/tcg_rim_tool/src/test/resources/testCsv.swidtag @@ -1,6 +1,6 @@ - - + +