cross_authenticode/
lib.rs

1//! Cross platform library for verifying Authenticode signed files.
2//!
3//! This library can be used to verify the Authenticode signature of a PE file on both Windows and
4//! Linux.
5//!
6//! # Example
7//! ```rust
8//! use cross_authenticode::AuthenticodeInfo;
9//! use std::fs::File;
10//! use std::path::PathBuf;
11//!
12//! let pe_path = PathBuf::from("test-pe/test-signed-64.bin");
13//! let pe_file = std::fs::read(pe_path).unwrap();
14//!
15//! let ai = AuthenticodeInfo::try_from(&pe_file).unwrap();
16//!
17//! // Check thumbprints of the first two certificates
18//! assert_eq!(ai.certificates[0].sha1, "f55115d2439ce0a7529ffaaea654be2c71dce955");
19//! assert_eq!(ai.certificates[1].sha1, "580a6f4cc4e4b669b9ebdc1b2b3e087b80d0678d");
20//! ```
21
22mod authenticode_certificate;
23mod authenticode_info;
24mod error;
25mod win_certificate;
26
27pub use authenticode_info::AuthenticodeInfo;