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 {
283283 CertificateStatusUnknown ,
284284}
285285
286+
287+ impl ValidationError for OcspError {
288+ // ...
289+ }
290+
286291const DATE_FMT : & str = "%Y-%m-%d %H:%M:%S %Z" ;
287292
288293#[ cfg( not( target_arch = "wasm32" ) ) ]
Original file line number Diff line number Diff line change 1212// each license.
1313
1414use bcder:: Oid ;
15+ use c2pa_status_tracker:: ValidationError ;
1516use thiserror:: Error ;
1617
1718use super :: oids:: * ;
@@ -164,3 +165,7 @@ impl From<crate::webcrypto::WasmCryptoError> for RawSignatureValidationError {
164165 }
165166 }
166167}
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