create Command¶
Creates a RIM, CoRIM, or CoSWID tag from a given configuration input file, and writes to a specified output file.
Can optionally sign as well as create. Please see the Sign command page for further details.
Usage¶
Parameters¶
| Parameter | Description | Required | Type |
|---|---|---|---|
-r, --rim-type |
Specifies the RIM type. | Yes | String |
-c, --config |
Specifies the configuration file for building the RIM. | Yes | File |
-l, --rimel |
Support RIM (PC Client RIM only). | Yes1 | File |
-a, --algorithm |
Support RIM hash algorithm (PC Client RIM only), SHA256 by default.3 | No | String |
-u, --unsigned |
Specifies that the RIM is unsigned. | Yes | |
-o, --out |
The path of the file to write the RIM to. | Yes | File |
| Parameter | Description | Required | Type |
|---|---|---|---|
-r, --rim-type |
Specifies the RIM type. | Yes | String |
-c, --config |
Specifies the configuration file for building the RIM. | Yes | File |
-l, --rimel |
Support RIM (PC Client RIM only). | Yes1 | File |
-k, --private-key-file |
The private key used to sign the Base RIM created by this tool. | Yes | File |
-p, --public-certificate |
The public key certificate to be used to verify the RIM. | Yes2 | File |
-a, --algorithm |
Support RIM hash algorithm for PC Client RIMs; signing algorithm for COSE.3 | No | String |
-d, --detached |
For CoSWIDs, writes the detached payload to this path; -o holds the COSE signature envelope. |
No | File |
-e, --embed-cert |
Embeds a certificate, depending on output type.4 | No | |
-pk, --protected-kid |
A hexadecimal string that represents the key identifier to place in the COSE protected header.5 | No | String |
-uk, --unprotected-kid |
A hexadecimal string that represents the key identifier to place in the COSE unprotected header.5 | No | String |
-o, --out |
The path of the file to write the RIM to. | Yes | File |
Examples¶
Before Starting
Before running these examples, please ensure that you change into the data directory (requires installation):
Adapting the Examples
The files in the example data directory are illustrative, and you may need to update their metadata and file references for your intended use. For PC Client RIMs, also update or remove any populated Support RIM hash; supplying -l does not replace an existing hash. See PC Client RIM payload hashes.
Create a signed TCG PC Client Base RIM:
Create an unsigned CoSWID tag:
Create a CoRIM using CoMID:
-
Required when creating a TCG PC Client RIM, including when the configuration already declares a file hash. Optional for other RIM types. ↩↩
-
Required for signed XML RIMs and CoRIMs. For CoSWIDs, omit the certificate with a JSON Web Key containing
algandkid, or with-aplus-pk/-ukfor a PEM key. ↩ -
For PC Client RIM creation, use
SHA256(default),SHA384, orSHA512. Support RIM hash verification currently supports only SHA-256. For signed COSE output, use an IANA-registered COSE algorithm ; the certificate or JSON Web Key supplies the algorithm when provided. ↩↩ -
For PC Client XML-DSig : the provided certificate is embedded into the signed SWID tag. Component SWID creation does not currently embed the certificate.
For COSE : the provided certificate and its thumbprint are embedded into the protected header. ↩
-
Used for CoSWID COSE headers. If both are supplied, the protected KID takes precedence. ↩↩