Skip to main content

ritsp_ltv/
lib.rs

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