c2pa_crypto/cose/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright 2024 Adobe. All rights reserved.
// This file is licensed to you under the Apache License,
// Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
// or the MIT license (http://opensource.org/licenses/MIT),
// at your option.

// Unless required by applicable law or agreed to in writing,
// this software is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or
// implied. See the LICENSE-MIT and LICENSE-APACHE files for the
// specific language governing permissions and limitations under
// each license.

//! This module provides functions for working with [COSE] signatures.
//!
//! [COSE]: https://datatracker.ietf.org/doc/rfc9052/

mod certificate_info;
pub use certificate_info::CertificateInfo;

mod certificate_trust_policy;
pub use certificate_trust_policy::{
    CertificateTrustError, CertificateTrustPolicy, InvalidCertificateError,
};

mod certificate_profile;
pub use certificate_profile::{check_certificate_profile, CertificateProfileError};

mod error;
pub use error::CoseError;

mod ocsp;
pub use ocsp::{check_ocsp_status, check_ocsp_status_async, OcspFetchPolicy};

mod sign;
pub use sign::{sign, sign_async};

mod sign1;
pub use sign1::{
    cert_chain_from_sign1, parse_cose_sign1, signing_alg_from_sign1, signing_time_from_sign1,
    signing_time_from_sign1_async,
};

mod sigtst;
pub(crate) use sigtst::{
    add_sigtst_header, add_sigtst_header_async, validate_cose_tst_info,
    validate_cose_tst_info_async,
};

mod time_stamp_storage;
pub use time_stamp_storage::TimeStampStorage;

mod verifier;
pub use verifier::Verifier;