tsp-ltv 0.4.0

Shared timestamping (RFC 3161) and long-term validation (OCSP, CRL, trust stores) infrastructure for AdES signatures
Documentation
#![cfg(feature = "fips")]

use tsp_ltv::crypto::algorithm::DigestAlgorithm;

#[test]
fn digest_requires_explicit_backend_initialization() {
    let error = DigestAlgorithm::Sha256
        .digest(b"must fail closed")
        .expect_err("FIPS digest before initialization must fail");
    assert!(matches!(
        error,
        kryptering::Error::BackendNotInitialized { .. }
    ));
}

#[cfg(feature = "tsp")]
#[test]
fn https_client_requires_explicit_backend_initialization() {
    let error = tsp_ltv::net::hardened_http_client()
        .expect_err("FIPS HTTPS client before initialization must fail");
    assert!(matches!(
        error,
        tsp_ltv::net::HttpClientError::Crypto(kryptering::Error::BackendNotInitialized { .. })
    ));
}