ruby-c2pa 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +153 -0
- data/CONTRIBUTING.md +117 -0
- data/README.md +276 -22
- data/Rakefile +29 -1
- data/ext/c2pa_native/Cargo.lock +4215 -0
- data/ext/c2pa_native/Cargo.toml +1 -1
- data/ext/c2pa_native/src/lib.rs +124 -5
- data/lib/c2pa/config.rb +90 -0
- data/lib/c2pa/digital_source_types.rb +72 -0
- data/lib/c2pa/error.rb +3 -0
- data/lib/c2pa/manifest.rb +156 -9
- data/lib/c2pa/version.rb +1 -1
- data/lib/c2pa.rb +105 -4
- data/ruby-c2pa.gemspec +28 -3
- metadata +11 -12
- data/ext/c2pa_native/target/release/build/oid-registry-c350c75504c969dc/out/oid_db.rs +0 -540
- data/ext/c2pa_native/target/release/build/pix-f303ab89d734032b/out/gamma_lut.rs +0 -68
- data/ext/c2pa_native/target/release/build/serde-2e9abb4d9d73cae4/out/private.rs +0 -6
- data/ext/c2pa_native/target/release/build/serde-f471616b462b0caf/out/private.rs +0 -6
- data/ext/c2pa_native/target/release/build/serde_core-2b94e9134dc44065/out/private.rs +0 -5
- data/ext/c2pa_native/target/release/build/serde_core-3dc945fa0ab21dd5/out/private.rs +0 -5
- data/ext/c2pa_native/target/release/build/thiserror-a1f4c63469c326b9/out/private.rs +0 -5
- data/ext/c2pa_native/target/release/build/typenum-4eb7d34b9fb695ef/out/tests.rs +0 -20563
- data/ext/c2pa_native/target/release/build/typenum-b8de96984639a942/out/tests.rs +0 -20563
data/Rakefile
CHANGED
|
@@ -14,5 +14,33 @@ Rake::TestTask.new(:test) do |t|
|
|
|
14
14
|
t.verbose = true
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
# The signing tests need an X.509 certificate chain and key per algorithm.
|
|
18
|
+
# These are generated locally rather than downloaded: it needs no network, it
|
|
19
|
+
# covers every algorithm the gem accepts rather than only ES256, and it keeps
|
|
20
|
+
# third-party material out of the repository entirely.
|
|
21
|
+
#
|
|
22
|
+
# The generated chains are rooted in a CA created here, so signed assets carry
|
|
23
|
+
# a signingCredential.untrusted warning. That does not make a manifest invalid.
|
|
24
|
+
#
|
|
25
|
+
# They are written to an ignored directory rather than committed: a PEM private
|
|
26
|
+
# key in a content-authenticity repository reads badly and trips secret
|
|
27
|
+
# scanning, and regenerating them costs a fraction of a second.
|
|
28
|
+
namespace :fixtures do
|
|
29
|
+
desc "Generate the signing certificates used by the test suite"
|
|
30
|
+
task :certs do
|
|
31
|
+
require_relative "test/fixtures/generate_certs"
|
|
32
|
+
CertificateFixtures.generate_all
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
desc "Regenerate the signing certificates, replacing any that exist"
|
|
36
|
+
task :certs_force do
|
|
37
|
+
require_relative "test/fixtures/generate_certs"
|
|
38
|
+
CertificateFixtures.generate_all(force: true)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Tests depend on the certificates, so a checkout can run `rake test` with no
|
|
43
|
+
# manual setup, and a missing certificate fails the run rather than quietly
|
|
44
|
+
# skipping the tests that do the real work.
|
|
45
|
+
task test: [:compile, "fixtures:certs"]
|
|
18
46
|
task default: :test
|