HIRS/tools/xml_dsig_tool
2022-10-26 10:25:19 -04:00
..
privateRimKey.pem Rename directory tcg_rim_tool_msdotnet to xml_dsig_tool 2022-08-01 12:20:13 -04:00
README.md Merge branch 'master' into java_xml_timestamp 2022-10-26 10:25:19 -04:00
RimSignCert.pem Rename directory tcg_rim_tool_msdotnet to xml_dsig_tool 2022-08-01 12:20:13 -04:00
unsigned.xml Rename directory tcg_rim_tool_msdotnet to xml_dsig_tool 2022-08-01 12:20:13 -04:00
xmlDsig.cs WIP: debug function prints out the xml data to be signed, but the calculated signature value is not decoding properly. 2022-08-11 11:59:46 -04:00

The xml_dsig_tool is a Windows command line application that provides the ability to perform basic cryptographic functions per the W3C XML Signature Syntax and Processing Version 1.1. The functions include:

sign : append an enveloped signature to an unsigned XML document validate : validate a signed base rim's signature (NOTE: cryptographic validation only, this tool does not validate the RIM structure)

Build and package

  • Install Visual Studio
  • The recommended project name is "xml_dsig_tool" so that the resulting executable file will be appropriately named xml_dsig_tool.exe.
  • Install NuGet packages:
    • System.CommandLine.2.0.0-beta4 (check "Include Prerelease" next to search bar)
    • System.Security.Cryptography.X509Certificates
    • System.Security.Cryptography.Xml
  • Publish executable
  • Install support files to .exe directory
    • privateRimKey.pem
    • RimSignCert.pem
    • unsigned.xml

Running xml_dsig_tool

Navigate to the .exe directory and run the following commands

help

sign --file unsigned.xml --private-key privateKey.pem

validate --file signed_unsigned.xml --certificate RimSignCert.pem