You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Make openssl and rust_native_crypto features additive (#1379)
* fix: make `openssl` and `rust_native_crypto` features additive
* style: alphabetize openssl feature
* docs: document openssl and rust_native_crypto features
* docs: fix typo
Copy file name to clipboardExpand all lines: docs/usage.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ c2pa = { version = "0.45.2", features = ["file_io", "add_thumbnails"] }
34
34
35
35
The Rust library crate provides the following capabilities:
36
36
37
+
*`openssl`*(enabled by default)* - Enables the system `openssl` implementation for cryptography.
38
+
*`rust_native_crypto` - Enables the Rust native implementation for cryptography.
37
39
*`add_thumbnails` generates thumbnails automatically for JPEG and PNG files. (no longer included with `file_io`)
38
40
*`fetch_remote_manifests` enables the verification step to retrieve externally referenced manifest stores. External manifests are only fetched if there is no embedded manifest store and no locally adjacent .c2pa manifest store file of the same name.
39
41
*`file_io` enables manifest generation, signing via OpenSSL, and embedding manifests in [supported file formats](supported-formats.md).
@@ -43,6 +45,10 @@ The Rust library crate provides the following capabilities:
43
45
*`v1_api` - Use the old API (which will soon be deprecated) instead of the [new API](release-notes.md#new-api).
44
46
*`pdf` - Enable support for reading claims on PDF files.
45
47
48
+
> [!NOTE]
49
+
> If both `rust_native_crypto` and `openssl` are enabled, it will default to `rust_native_crypto`.
50
+
> It is recommended to disable default features when using `rust_native_crypto` as to avoid including `openssl` as a dependency.
51
+
46
52
### New API
47
53
48
54
The new API is now enabled by default. The `unstable_api` feature is no longer available.
@@ -78,7 +84,7 @@ When `file_io` is enabled, the lack of a scheme will be interpreted as a `file:/
78
84
79
85
### Source asset vs parent asset
80
86
81
-
The source asset isn't always the parent asset: The source asset is the asset that is hashed and signed. It can be the output from an editing application that has not preserved the manifest store from the parent. In that case, the application should have extracted a parent ingredient from the parent asset and added that to the manifest definition.
87
+
The source asset isn't always the parent asset: The source asset is the asset that is hashed and signed. It can be the output from an editing application that has not preserved the manifest store from the parent. In that case, the application should have extracted a parent ingredient from the parent asset and added that to the manifest definition.
82
88
83
89
- Parent asset: with a manifest store.
84
90
- Parent ingredient: generated from that parent asset (hashed and validated)
@@ -90,7 +96,7 @@ If there is no parent ingredient defined, and the source has a manifest store, t
90
96
### Remote URLs and embedding
91
97
92
98
The default operation of C2PA signing is to embed a C2PA manifest store into an asset. The library also returns the C2PA manifest store so that it can be written to a sidecar or uploaded to a remote service.
93
-
- The API supports embedding a remote URL reference into the asset.
99
+
- The API supports embedding a remote URL reference into the asset.
94
100
- The remote URL is stored in different ways depending on the asset, but is often stored in XMP data.
95
101
- The remote URL must be added to the asset before signing so that it can be hashed along with the asset.
96
102
- Not all file formats support embedding remote URLs or embedding manifests stores.
0 commit comments