File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,11 @@ pub enum OcspError {
283
283
CertificateStatusUnknown ,
284
284
}
285
285
286
+
287
+ impl ValidationError for OcspError {
288
+ // ...
289
+ }
290
+
286
291
const DATE_FMT : & str = "%Y-%m-%d %H:%M:%S %Z" ;
287
292
288
293
#[ cfg( not( target_arch = "wasm32" ) ) ]
Original file line number Diff line number Diff line change 12
12
// each license.
13
13
14
14
use bcder:: Oid ;
15
+ use c2pa_status_tracker:: ValidationError ;
15
16
use thiserror:: Error ;
16
17
17
18
use super :: oids:: * ;
@@ -164,3 +165,7 @@ impl From<crate::webcrypto::WasmCryptoError> for RawSignatureValidationError {
164
165
}
165
166
}
166
167
}
168
+
169
+ impl ValidationError for RawSignatureValidationError {
170
+ // ...
171
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2024 Adobe. All rights reserved.
2
+ // This file is licensed to you under the Apache License,
3
+ // Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
4
+ // or the MIT license (http://opensource.org/licenses/MIT),
5
+ // at your option.
6
+
7
+ // Unless required by applicable law or agreed to in writing,
8
+ // this software is distributed on an "AS IS" BASIS, WITHOUT
9
+ // WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or
10
+ // implied. See the LICENSE-MIT and LICENSE-APACHE files for the
11
+ // specific language governing permissions and limitations under
12
+ // each license.
13
+
14
+ /// A `ValidationError` describes an error that was found when validating a C2PA manifest.
15
+ pub trait ValidationError {
16
+ /// Returns the C2PA validation code for the error condition.
17
+ ///
18
+ /// May return `None` if the error condition is not described in the C2PA Technical Specification.
19
+ fn validation_code ( & self ) -> Option < Cow < ' static , str > > ;
20
+
21
+ /// Returns the JUMBF path to the location where the error condition was identified.
22
+ ///
23
+ /// May return `None` if the error condition does not pertain to a specific box in the manifest store.
24
+ fn jumbf_path ( & self ) -> Option < Cow < ' static , str > > ;
25
+ }
You can’t perform that action at this time.
0 commit comments