HIRS/tools/tcg_rim_tool
iadgovuser26 72b37cec61
Merge pull request #815 from SuperPotato27/v3_issue_810
(WIP) Added action to package the RIM tool and the EventLog tool for windows.
2024-09-04 10:30:21 -04:00
..
config/spotbugs The initial issue found in the tcg event log code is present in the 2023-12-20 15:53:32 -05:00
gradle/wrapper added VERSION file to /opt/hirs 2024-01-16 18:28:40 -05:00
libs Rename project to tcg_rim_tool and move under tools/ directory 2020-01-06 16:14:04 -05:00
scripts updated with package for tcg_rim_tool [no ci] 2023-03-17 14:47:10 -04:00
src Modify rimtool to properly namespace timestamp elements 2024-06-20 08:45:32 -04:00
build.gradle fixed jar file name inside zip 2024-07-17 14:27:26 -04:00
gradlew Rename project to tcg_rim_tool and move under tools/ directory 2020-01-06 16:14:04 -05:00
gradlew.bat Rename project to tcg_rim_tool and move under tools/ directory 2020-01-06 16:14:04 -05:00
keystore.jks Implement --create, --attributes, --out, and --help in JCommander 2020-06-08 06:50:46 -04:00
package.sh Add git timestamp and hash to the rpm name. Also centralize version number to package.sh. 2022-03-04 10:19:06 -05:00
README.md Updated README.md and VERSION files 2024-08-22 16:40:03 -04:00
rim_fields.json Check Directory and File for supportRIMFormat. An empty value defaults to TCG_EventLog_Assertion. Update unit tests. 2022-03-14 14:21:18 -04:00
RimSignCert.pem Print AIA extension from validation cert 2020-07-23 10:06:49 -04:00
tcg_rim_tool.spec Prevent jar file from being truncated by packaging. 2022-03-04 10:19:06 -05:00

To support the TCG RIM concept a new command line application called the The tcg_rim_tool has been created. The tcg_rim_tool can be used to create NISTIR 8060 compatible SWID tags that adhere to the TCG PC Client RIM specification. It also supports the ability to digitally sign the Base RIM file as the HIRS ACA will require a valid signature in order to upload any RIM file.

Building

Linux

To build this tool navigate to the tcg_eventlog-tool directory and use the following command:

./gradlew clean build

Windows

Several options exist for building on Windows 11:

  1. Windows command shell (CMD.exe):
    • Navigate to the tcg_eventlog_tool folder and run the widows gradle wrapper:

    gradlew.bat clean build

  2. Windows powershell with Windows Subsystem for Linux enabled.
    • Navigate to the tcg_eventlog_tool folder and run the Linux gradle wrapper:

    ./gradlew clean build

In both cases the tcg_rim_tool-X.X.jar file should have been placed in the build\libs\tools\ (Windows) or build/libs/tools/ (Linux) folder.

Packaging

Packages for this tool can be found on the [HIRS release page](https://github.com/nsacyber/HIRS/release

Currently only a packaging for Linux is supported.

To create an RPM package on a Redhat or Rocky linux device use the following command in the same directory:

./gradlew buildRpm

or for a Debian or Ubuntu Linux distro:

./gradlew buildDeb

the package can be found under the build/distributions/ folder

Installing

Currently only a install packages for Linux are supported.

To install this tool on a Redhat or Rocky Linux distro use the following command from the same directory:

sudo dnf install build/distributions/tcg_eventlog_tool*.rpm

or for a Debian or Ubuntu Linux distro:

sudo apt-get install build/distributions/tcg_eventlog_tool*.deb

Usage

The tcg_rim_tool rpm will create a rim commandline shortcut. This can be invoked from a command line:

rim -h

The tcg_eventlog_tool also can be invoked using java from the tcg_eventlog_tool directory:

java -jar build/libs/tools/tcg_rim_tool-1.0.jar -h

Current options for the tool can be found using the -h option.