Skip to main content

Crate wintrust

Crate wintrust 

Source
Expand description

Portable catalog trust with idiomatic Rust functions and Windows-name aliases.

With the std feature, WinVerifyTrust re-exports win_verify_trust with the same safe Rust signature. These names do not expose the Windows C ABI or inherit the machine catalog database. Policy and member format remain explicit.

The default build uses no_std with alloc. Supply pinned artifact bytes through portable::Verifier::from_artifact_reader and an explicit clock. Filesystem APIs and automatic clock capture require std.

use wintrust::{CryptCATAdminAcquireContext2, crypt_cat_admin_acquire_context2};
use wintrust::portable::sip::{DigestAlgorithm, MemberHashPolicy, SipKind};

let context = CryptCATAdminAcquireContext2(
    DigestAlgorithm::Sha256, SipKind::FlatXml, MemberHashPolicy::default(),
)?;
let other = crypt_cat_admin_acquire_context2(
    DigestAlgorithm::Sha256, SipKind::FlatXml, MemberHashPolicy::default(),
)?;

Re-exports§

pub use error::Error;
pub use error::Result;
pub use catalog_trust::portable;

Modules§

catalog
Bounded inspection of Microsoft PKCS#7 catalog CTLs. Parsing establishes no trust.
catalog_trust
Windows catalog-member trust reference. Hash matching alone is not trust.
ctl
Generic bounded CTL inspection. Parsing never authenticates a list or its entries.
error
Errors exposed by cryptographic verification and trust-policy APIs.

Structs§

CertificateStore
A collection view over owned or borrowed DER buffers, without copying bytes.
ObjectIdentifier
Object identifier (OID).