Skip to content

Commit ea1444c

Browse files
authored
docs: Remove outdated ref to CreativeWork, other small edits (#1770)
* Remove outdated ref to CreativeWork, other small edits * Put full CLI reference in separate file * misc edits * docs: Change header levels * Remove command ref * docs: Clarify -o option * docs: Update trust support info * docs: add URL for aca inspect
1 parent 9e3173c commit ea1444c

4 files changed

Lines changed: 121 additions & 84 deletions

File tree

cli/README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,25 @@ For a simple example of calling c2patool from a Node.js server application, see
1414

1515
**Additional documentation**:
1616

17-
- [Using C2PA Tool](https://github.com/contentauth/c2pa-rs/blob/main/cli/docs/usage.md)
18-
- [Manifest definition file](https://github.com/contentauth/c2pa-rs/blob/main/cli/docs/manifest.md)
19-
- [Using an X.509 certificate](https://github.com/contentauth/c2pa-rs/blob/main/cli/docs/x_509.md)
20-
- [Change log / release notes](https://github.com/contentauth/c2pa-rs/blob/main/cli/CHANGELOG.md)
21-
- [Contributing to the project](https://github.com/contentauth/c2pa-rs/blob/main/cli/docs/project-contributions.md)
17+
- [Using C2PA Tool](docs/usage.md)
18+
- [Manifest definition file](docs/manifest.md)
19+
- [Using an X.509 certificate](docs/x_509.md)
20+
- [Change log / release notes](CHANGELOG.md)
21+
- [Contributing to the project](docs/project-contributions.md)
2222

2323
</div>
2424

2525
## Installation
2626

27-
To install a prebuilt binary of C2PA Tool:
27+
If you are using macOS, you can install C2PA Tool using Homebrew:
28+
29+
1. Install [Homebrew](https://brew.sh/) if you haven't already done so.
30+
1. Install C2PA Tool:
31+
```
32+
brew install c2patool
33+
```
34+
35+
If you're using another OS or don't want to use Homebrew, install a prebuilt binary of C2PA Tool:
2836

2937
1. Go to the [Releases page and filter for c2patool](https://github.com/contentauth/c2pa-rs/releases?q=c2patool).
3038
2. Under **Assets**, click on the archive file for your operating system:
@@ -33,19 +41,20 @@ To install a prebuilt binary of C2PA Tool:
3341
- Linux: `c2patool-vx.y.z-x86_64-unknown-linux-gnu.tar.gz`
3442
3. Download and extract the archive file.
3543
4. Copy the `c2patool` executable file to a location on your `PATH`.
36-
5. Confirm that you can run the tool by entering a command such as:
44+
45+
46+
After installing, confirm that you can run the tool by entering a command such as:
3747
```
3848
c2patool -h
3949
```
4050

41-
You may need to set execution permission for the tool on your system.
42-
For macOS, see [If you want to open an app that hasn’t been notarized or is from an unidentified developer](https://support.apple.com/en-us/102445#openanyway).
51+
When running a prebuilt binary, you may need to set execution permission for the tool on your system. For macOS, see [If you want to open an app that hasn’t been notarized or is from an unidentified developer](https://support.apple.com/en-us/102445#openanyway).
4352

4453
NOTE: You also may want to get some of the example files provided in the repository `sample` directory. To do so, clone the repository with `git clone https://github.com/contentauth/c2pa-rs.git`.
4554

4655
### Installing from source
4756

48-
Instead of installing a prebuilt binary, you can [build the project from source](https://github.com/contentauth/c2pa-rs/blob/main/cli/docs/project-contributions.md#building-from-source).
57+
Instead of installing a prebuilt binary, you can [build the project from source](docs/project-contributions.md#building-from-source).
4958

5059
### Upgrading
5160

@@ -55,4 +64,6 @@ To display the version of C2PA Tool that you have, enter this command:
5564
c2patool -V
5665
```
5766

58-
The tool will display the version installed. Compare the version number displayed with the latest release version shown in the [repository releases page filtered for c2patool](https://github.com/contentauth/c2pa-rs/releases?q=c2patool). If you don't have the latest version, simply reinstall to get the latest version.
67+
The tool will display the version installed. Compare the version number displayed with the latest release version shown in the [repository releases page filtered for c2patool](https://github.com/contentauth/c2pa-rs/releases?q=c2patool).
68+
69+
If you don't have the latest version, simply reinstall C2PA Tool to get the latest version.

cli/docs/manifest.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,13 @@ In the manifest definition file, file paths are relative to the location of the
55

66
## JSON format
77

8-
The C2PA specification describes a manifest that has a binary structure in JPEG universal metadata box format (JUMBF). However, C2PA Tool works with a JSON manifest structure that's easier to understand and work with. It's a declarative language for representing and creating a manifest in binary format. For more information on the JSON manifest, see [Working with manifests](https://opensource.contentauthenticity.org/docs/manifest/understanding-manifest).
8+
The C2PA specification describes a manifest that has a binary structure in JPEG universal metadata box format (JUMBF). However, C2PA Tool works with a JSON manifest structure that's easier to understand and work with. It's a declarative language for representing and creating a manifest in binary format.
99

10-
See also:
11-
12-
* <a href="https://opensource.contentauthenticity.org/docs/manifest/manifest-ref" target="_self">Manifest store reference</a>
13-
* <a href="https://opensource.contentauthenticity.org/docs/manifest/manifest-json-schema" target="_self">Manifest store schema</a>
14-
* <a href="https://github.com/contentauth/c2pa-rs/blob/main/cli/schemas/manifest-definition.json" target="_self">Manifest definition schema</a>
15-
* <a href="https://github.com/contentauth/c2pa-rs/blob/main/cli/schemas/ingredient.json" target="_self">Ingredient schema</a>
10+
See also <a href="https://opensource.contentauthenticity.org/docs/manifest/json-ref/" target="_self">JSON manifest reference</a>.
1611

1712
## Adding a claim generator icon
1813

19-
You can specify an icon to be displayed by tools such as [Verify](https://contentcredentials.org/verify) to indicate the signer of the manifest.
14+
You can specify an icon to be displayed by tools such as [Inspect tool on Adobe Content Authenticity (Beta)](https://inspect.cr/) (also called ACA Inspect) to indicate the signer of the manifest.
2015

2116
To do this, add a `claim_generator_info` property to the manifest definition. The `claim_generator_info.icon` property contains information on the icon:
2217
- `icon.format` specifies the MIME type of the icon file. SVG format is preferred, but you can also use PNG or JPEG formats.
@@ -43,43 +38,49 @@ To add the icon using C2PA Tool, make sure the icon file and the manifest defini
4338
c2patool image_to_sign.jpg -m manifest.json -o signed_with_icon.jpg
4439
```
4540

46-
NOTE: The [Verify](https://contentcredentials.org/verify) tool will not display an icon for a signing certificate that is not on the temporary certificate list, such as the C2PA Tool test certificate.
47-
48-
## Example
49-
50-
The example below is a snippet of a manifest definition that inserts a `CreativeWork` author assertion. This example uses the default testing certificates in the [sample folder](https://github.com/contentauth/c2pa-rs/tree/main/cli/sample) that are also built into the `c2patool` binary.
41+
NOTE: [ACA Inspect](https://inspect.cr/) will only display an icon for a signing certificate if the certificate can be traced back to a root certificate on the [C2PA trust list](https://opensource.contentauthenticity.org/docs/conformance/trust-lists#c2pa-trust-list).
5142

52-
**NOTE**: When you don't specify a key or certificate in the manifest `private_key` and `sign_cert` fields, the tool will use the built-in key and cert. You'll see a warning message, since they are meant for development purposes only. For actual use, provide a permanent key and certificate in the manifest definition or environment variables; see [Creating and using an X.509 certificate](x_509.md).
43+
## Special properties used by C2PA Tool
5344

54-
The following manifest properties are specific to c2patool and used for signing manifests:
45+
The following manifest properties are specific to C2PA Tool and used for signing manifests:
5546

5647
- `alg`: Signing algorithm to use. See [Creating and using an X.509 certificate](x_509.md) for possible values. Default: `es256`.
5748
- `private_key`: Private key to use. Default: `es256_private.key`
5849
- `sign_cert`: Signing certificate to use. Default: `es256_certs.pem`
59-
- `ta_url`: Time Authority URL for getting a time-stamp (for example, `http://timestamp.digicert.com`). A time-stamp provides a way to confirm that the manifest was signed when the certificate was valid, even if the certificate has since expired. Howver, the Time Authority URL requires a live online connection for confirmation, which may not always be available.
50+
- `ta_url`: Time Authority URL for getting a time-stamp (for example, `http://timestamp.digicert.com`). A time-stamp provides a way to confirm that the manifest was signed when the certificate was valid, even if the certificate has since expired. However, the Time Authority URL requires a live online connection for confirmation, which may not always be available.
51+
52+
## Example
53+
54+
The example below is a minimal manifest definition that uses a default testing certificate in the [sample folder](https://github.com/contentauth/c2pa-rs/tree/main/cli/sample) that are also built into the `c2patool` binary.
55+
56+
**NOTE**: When you don't specify a key or certificate in the manifest `private_key` and `sign_cert` fields, the tool will use the built-in key and cert. You'll see a warning message, since they are meant for development purposes only.
57+
58+
For actual use, provide a permanent key and certificate in the manifest definition or environment variables; see [Creating and using an X.509 certificate](x_509.md).
6059

6160
```json
6261
{
6362
"alg": "es256",
64-
"private_key": "es256_private.key",
65-
"sign_cert": "es256_certs.pem",
63+
"private_key": "/Users/randmckinney/work/cai/c2pa-rs/cli/sample/es256_private.key",
64+
"sign_cert": "/Users/randmckinney/work/cai/c2pa-rs/cli/sample/es256_certs.pem",
6665
"ta_url": "http://timestamp.digicert.com",
6766

6867
"claim_generator": "TestApp",
6968
"assertions": [
7069
{
71-
"label": "stds.schema-org.CreativeWork",
72-
"data": {
73-
"@context": "https://schema.org",
74-
"@type": "CreativeWork",
75-
"author": [
76-
{
77-
"@type": "Person",
78-
"name": "Joe Bloggs"
79-
}
80-
]
81-
}
70+
"label": "c2pa.actions.v2",
71+
"data": {
72+
"actions": [
73+
{
74+
"action": "c2pa.created",
75+
"softwareAgent": "My Demo",
76+
"digitalSourceType": "http://cv.iptc.org/newscodes/digitalsourcetype/digitalArt"
77+
}
78+
],
79+
"allActionsIncluded": true
80+
}
8281
}
83-
]
82+
]
8483
}
8584
```
85+
86+

0 commit comments

Comments
 (0)