tasign 0.2.0

TA ELF signing utilities with CMS/PKCS#7 support
//! X.509 certificate chain verification (`tasign::x509`).

extern crate alloc;

#[cfg(feature = "std")]
extern crate std;

#[cfg(all(feature = "backend-mbedtls", feature = "backend-rustcrypto"))]
compile_error!(
    "features `backend-mbedtls` and `backend-rustcrypto` are mutually exclusive; \
     use `--no-default-features` when enabling `backend-rustcrypto`"
);

#[cfg(not(any(feature = "backend-mbedtls", feature = "backend-rustcrypto")))]
compile_error!("enable exactly one of `backend-mbedtls` or `backend-rustcrypto`");

pub mod error;

#[cfg(all(feature = "backend-mbedtls", not(feature = "backend-rustcrypto")))]
mod verify_mbedtls;

#[cfg(all(feature = "backend-rustcrypto", not(feature = "backend-mbedtls")))]
pub mod pkix_path;

#[cfg(all(feature = "backend-rustcrypto", not(feature = "backend-mbedtls")))]
mod verify_rustcrypto;

#[cfg(all(feature = "backend-rustcrypto", not(feature = "backend-mbedtls")))]
mod sm2_verifier;

pub use error::{Result, X509Error};

#[cfg(all(feature = "backend-mbedtls", not(feature = "backend-rustcrypto")))]
pub use verify_mbedtls::verify_chain;

#[cfg(all(feature = "backend-rustcrypto", not(feature = "backend-mbedtls")))]
pub use verify_rustcrypto::{verify_chain, verify_chain_at};