Skip to main content

tsp_ltv/
lib.rs

1//! # tsp-ltv
2//!
3//! Shared timestamping (RFC 3161) and long-term validation infrastructure
4//! for Advanced Electronic Signature (AdES) formats.
5//!
6//! This crate provides the core types and network clients for:
7//! - **TSP**: RFC 3161 timestamp requests, responses, and validation
8//! - **OCSP**: Online Certificate Status Protocol client (RFC 6960)
9//! - **CRL**: Certificate Revocation List fetching and caching (RFC 5280)
10//! - **Trust**: Certificate trust stores, chain building, and validation
11//!
12//! It is format-agnostic — it does not know about PDF, XML, or JSON.
13//! Each AdES crate (underskrift for PAdES/CAdES, bergshamra for XAdES,
14//! jades for JAdES) builds its own format-specific embedding on top
15//! of these shared clients.
16
17#[cfg(not(any(feature = "rustcrypto", feature = "aws-lc")))]
18compile_error!("select exactly one document provider: rustcrypto or aws-lc");
19#[cfg(all(feature = "rustcrypto", feature = "aws-lc"))]
20compile_error!("document provider features are mutually exclusive: select exactly one");
21#[cfg(all(
22    feature = "tsp",
23    not(any(feature = "tls-ring", feature = "tls-aws-lc"))
24))]
25compile_error!("networking requires exactly one TLS provider: tls-ring or tls-aws-lc");
26#[cfg(all(feature = "tls-ring", feature = "tls-aws-lc"))]
27compile_error!("TLS provider features are mutually exclusive: select exactly one");
28
29pub use kryptering::{
30    backend_info, capabilities, initialize_backend, supports, BackendId, BackendInfo, Capability,
31    FipsStatus, Operation, TlsBackendId,
32};
33
34// Always-compiled modules
35pub mod crypto;
36pub mod der_utils;
37pub mod error;
38pub mod trust;
39
40// Feature-gated modules
41#[cfg(feature = "tsp")]
42pub mod net;
43
44#[cfg(feature = "tsp")]
45pub mod tsp;
46
47#[cfg(feature = "ltv")]
48pub mod ltv;